1 Exploration

1.1 Dataset

1.1.1 Boards

library(lattice)
library(RODBC)
ch = odbcConnect('Hyne',uid='sa',pwd="password12")

mypanel = function(x,y,...) {
  panel.abline(c(0,1), col='grey70', lty=2)
  panel.xyplot(x,y,...)
}

B = sqlQuery(ch, "
             select 
                SWILogNumber,
                g.MOE [E.g], 
                g.Density [den.g], 
                m.swv [v.d.hitman], 
                h.[Density_kg/m3] [den.d.lhg], 
                h.[MOE.cltraw] [E.d.clt], 
                m.pith, 
                m.wane,
                m.bow,
                m.crook,
                m.twist,
                X_Dens [den.d.chh],
                X_Clear [den.d.chh.clear],
                X_DynE [E.d.chh.dyn],
                X_AvgE [E.d.chh.avg],
                X_MOE [E.d.chh.moe],
                xc, yc
             from (
                select 
                  flitchId, 
                  max(pith) pith, 
                  max(wane) wane, 
                  avg(swv) swv, 
                  avg(bow) bow, 
                  avg(crook) crook, 
                  avg(twist) twist
                from manualMeas group by flitchId
             ) m 
             left join CHHBoards c on c.flitchId=m.flitchId
             left join HyneDryBoards h on h.flitchId=m.flitchId
             left join ecoustic g on m.flitchId=g.flitchId
             left join (
                select 
                  flitchId, 
                  max(SWILogNumber) SWILogNumber 
                from 
                  boardEndImages i, barcode_image bi, boardEndBarcodes b 
                where flitchId is not null and i.id=bi.imageId and bi.barcodeId=b.id group by flitchId
             ) f on f.flitchId=m.flitchId
             left join (
                select FlitchID, avg(boardCentroidX_mm) xc, avg(boardCentroidY_mm) yc
                from boardEndBarcodes b, boardEndImages i, barcode_image bi
                where b.id=bi.barcodeId and i.id=bi.imageId
                group by FlitchID
             ) xy on xy.FlitchID=m.flitchId
             ")
B$pith_wane = paste(B$pith,B$wane)
B$E.d.hitman = B$v.d^2*B$den.d.chh/1e9

# halve the SWV for ridiculosly fast ecoustic velocities
B$v.g = sqrt(B$E.g*1e9/B$den.g)
B$E.g.corrected = B$E.g
ii=!is.na(B$v.g) & B$v.g>4000
B$E.g.corrected[ii] = (B$v.g[ii]/2)^2*B$den.g[ii]/1e9

B$R = sqrt(B$xc^2 + B$yc^2)

nrow(B)
## [1] 1202

1202 boards. 62 not associated with a SWILogNumber.

1.1.2 Logs

L = sqlQuery(ch, "
             select 
               p.*,
               s.*,
               u.SWV [SWV.untrimmed], 
               t.SWV [SWV],
               t.weight,
               3.141592654*4.9/3*(rL*rL+rS*rL+rS*rS) [volume.heart]
             from 
               (select * from logs where SWILogNumber is not null and DateAndTime>'2014-08-31 00:00:00') p
               left join (select * from logs where SWILogNumber is not null and DateAndTime<'2014-08-31 00:00:00') s 
                 on s.SWILogNumber=p.SWILogNumber
               left join yardTrimmed t on p.SWILogNumber=t.SWILogNumber 
               left join yardUntrimmed u on p.SWILogNumber=u.SWILogNumber 
               left join (select 
                            l.SWILogNumber, l.heartwoodDiameter_mm/2000 rL, s.heartwoodDiameter_mm/2000 rS 
                            from logends l, logends s where s.SWILogNumber=l.SWILogNumber and s.logEnd='S' and l.logEnd='L'
               ) h on h.SWILogNumber=p.SWILogNumber
             order by p.SWILogNumber")
summ <- function(x) {
   return(list(
     avg=mean(x, na.rm=TRUE),
     p50=median(x, na.rm=TRUE),
     p75=quantile(x, 0.75, na.rm=TRUE)
     )) 
}
board.quality.measures = c('E.d.hitman','bow','crook','twist')
for (i in 1:nrow(L)) {
  ii=!is.na(B$SWILogNumber) & B$SWILogNumber==L[i,"SWILogNumber"]
  L[i,"nboards"]=sum(ii)
  L[i,"nboards.complete"]=nrow(na.omit(B[ii,board.quality.measures]))
  L[i,"E.avg"]=mean(B$E.d.clt[ii],na.rm=TRUE)
  L[i,"E.avg.dyn"]=mean(B$E.d.hitman[ii],na.rm=TRUE)
  L[i,"GPa10"]=sum(!is.na(B$E.d.hitman) & B$E.d.hitman>=10 & ii)/sum(ii)
  L[i,"GPa8"]=sum(!is.na(B$E.d.hitman) & B$E.d.hitman>=8 & ii)/sum(ii)
  L[i,"GPa6"]=sum(!is.na(B$E.d.hitman) & B$E.d.hitman>=6 & ii)/sum(ii)
  L[i,"npith"]=sum(ii & (!is.na(B$pith) & B$pith=='y'))
  for (measure in board.quality.measures) {
    for (region in c('','inner','outer')) {
      iregion = rep(TRUE,nrow(B))
      if (region=='inner') {
        iregion = B$R<=100
      } else if (region=='outer') {
        iregion = B$R>100 
      }
      results = summ(B[!is.na(B[,measure])&ii&iregion,measure])
      for (result in names(results)) {
        if (region=='') {
          out <- paste(measure,result,sep="_")
        } else {
          out <- paste(measure,result,region,sep="_")
        }
        L[i,out] = results[[result]]
      }
    }
  }
}

# calibre uses 0 to indicate missing 
L$velocity[L$velocity==0]=NA
L$velocity.1[L$velocity.1==0]=NA

L$hw.vfrac = L$volume.heart / L$volume
L$density = L$weight / L$volume

L$sweep.prod = L$m_sweep1*L$m_sweep2
L$sweep.prod.1 = L$m_sweep1.1*L$m_sweep2.1

L$E.gradient = L$E.d.hitman_avg_inner/L$E.d.hitman_avg_outer

#str(L)

predictors = c('SWV',
  'm_volume','m_led','m_sed',
  'm_a0','m_a1','m_a2','m_taper','m_waist',
  'm_ovality','m_whorliness',
  'm_sweep1','m_sweep2',
  'weight','density',
  'hw.vfrac',
  'sweep.prod')

1.1.3 Log End Imagery

Also grab digitized log end data:

D = sqlQuery(ch, "
  select 
    flipbookNumber SWILogNumber, 
    logEnd, 
    e.type, 
    x_mm x, 
    y_mm y 
  from
    LogEndDigitizationPoints p, 
    LogEndDigitizationEdges e, 
    LogEndDigitizations d 
  where 
    p.digitizationId=d.id 
    and e.digitizationId=d.id 
    and e.id=p.edgeID")#  and logEnd='large'")

1.2 Cleaning

Why are the shape metrics (m_*) missing for 10 logs? 9 of these logs (198,201,208,195,205,148,194,206,207) were the first put through, maybe the logselect software wasn’t running. The 10th is a log that for some reason couldn’t be matched to Royalty scanner Id (or perhaps no nin file matching that Id was available)


Hitman SWV isn’t available for the last trimmed log (223). Can we use untrimmed hitman swv?

#plot(L$SWV,L$SWV.untrimmed*1000.)
#identify(L$SWV,L$SWV.untrimmed*1000.,L$SWILogNumber)
c=rep('grey70',nrow(L))
c[L$SWILogNumber %in% c(157,183)]='red'
c[L$SWILogNumber %in% c(151)]='blue'
c[L$SWILogNumber %in% c(223)]='green'
tmp=L[,c("velocity","SWV.untrimmed","SWV","velocity.1")]
names(tmp)<-c("calibre.select","hitman.untrm","hitman.trmd","calibre.sawing")
pairs(tmp,col=c,main="Comparison of Log SWV Measures")

Three outliers (logs 151,157,183).

Trimmed SWV estimate good for logs 157, 183 (i.e. untrimmed SWV wrong).

Use hitman untrimmed estimate for log 151.

Use hitman untrimmed estimate for log 223.

TODO: re-extract hitman SWV from raw hitman data.

L$SWV[L$SWILogNumber==151] = L$SWV.untrimmed[L$SWILogNumber==151]*1000
L$SWV[L$SWILogNumber==223] = L$SWV.untrimmed[L$SWILogNumber==223]*1000

Do the two measures of volume/LED/SED agree?

plot(volume ~ m_volume, L)
plot(SED ~ m_sed, L)
plot(LED ~ m_led, L)

Yep, pretty much.


Is the heartwood volume stuff sane?

xyplot(volume.heart ~ volume, L)
xyplot(I(volume.heart/volume) ~ I(weight/volume), L)
summary(lm(I(weight/volume) ~ I(volume.heart/volume), L))
## 
## Call:
## lm(formula = I(weight/volume) ~ I(volume.heart/volume), data = L)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -105.612  -23.525   -5.409   19.012  130.911 
## 
## Coefficients:
##                        Estimate Std. Error t value Pr(>|t|)    
## (Intercept)            1058.725      8.902  118.93   <2e-16 ***
## I(volume.heart/volume) -520.867     34.059  -15.29   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 39.78 on 121 degrees of freedom
## Multiple R-squared:  0.659,  Adjusted R-squared:  0.6562 
## F-statistic: 233.9 on 1 and 121 DF,  p-value: < 2.2e-16

Regression suggests average sapwood density of 1058 kg/m^3, with average heartwood density of 537 kg/m^3.


Compare log metrics computed at selection and processing time (i.e. before and after being trimmed to 4.9m):

par(mfcol=c(4,4))
log.metrics = c("m_volume","m_led","m_sed","m_taper","m_waist","m_ovality","m_whorliness","m_a0","m_a1","m_a2","m_sweep1","m_sweep2","sweep.prod")
for (m in log.metrics) {
  plot(formula(paste(m,"~",m,".1",sep="")),L)
  }

For the most part log metrics are similar before and after trimming. Where differences do occur it might be due to the loss of material or to un-repeatability. CHECK

1.3 Recovery

plot(nboards ~ m_volume, L)
identify(L$m_volume, L$nboards, L$SWILogNumber, cex=0.8)
## integer(0)

Only one board recovered from log 106.

Two logs with abnormally poor recovery: 126, 192. Either these were sawn to non-90x40 products or gluing was poor and labels were lost.


Exclude these logs from further analysis.

L = L[!L$SWILogNumber%in%c(106,126,192),]

1.4 Stiffness Out-turn

bwplot( factor(SWILogNumber,levels=L$SWILogNumber[order(L$E.avg)],ordered=TRUE) ~ E.d.clt, B)
# and again but with only the best and worst and with individual boards
(worst=L$SWILogNumber[L$E.avg<quantile(L$E.avg,0.1)])
##  [1] 101 163 168 179 184 187 193 205 207 214 218 221
(best=L$SWILogNumber[L$E.avg>quantile(L$E.avg,0.9)])
##  [1] 135 140 143 154 159 176 190 200 203 206 213 216
bwplot( factor(SWILogNumber,levels=L$SWILogNumber[order(L$E.avg)],ordered=TRUE) ~ E.d.clt, B,subset=SWILogNumber %in% union(best,worst),
        panel=function(...){
          panel.bwplot(...)
          panel.points(...,col='red')
        }, main="Best and Worst 10% of Logs")

The worst (least stiff) boards are similar across all logs. The best (most stiff) boards howver range from <10 GPa to >15GPa.

Are good logs small?

plot(L$m_volume[order(L$E.avg)])
plot(L$nboards[order(L$E.avg)])

Bad logs tend to be both a little smaller and represented by fewer boards, but the effect is not strong.

1.5 Grade

Note that ‘GPax’ here denotes boards whose average MOE is x GPa or better, which is not really the same as having a GPax grade.

par(mfcol=c(3,1))
hist(L$GPa6, xlim=c(0,1), breaks=c(0:11)/10)
hist(L$GPa8, xlim=c(0,1), breaks=c(0:11)/10)
hist(L$GPa10, xlim=c(0,1), breaks=c(0:11)/10)
xyplot(jitter(L$GPa8,5)~jitter(L$GPa10,5))

Interesting that the 5 best logs if seeking GPa8 include one log that would be in the lower half if you were looking for GPa10.

par(mfcol=c(3,1))
plot(GPa6~ E.avg.dyn, L)
plot(GPa8~ E.avg.dyn, L)
plot(GPa10~ E.avg.dyn, L)

Log average MOE is not necessarily a good predictor of fraction of boards exceeding a particular MOE limit.

1.6 Marco’s Proposal Statement

How does the fraction GPa10+ vary with log quality? I.e. what is the % of GPa10+ in the worst X% of logs?

par(mfcol=c(1,1))
F=ecdf(L$GPa6)
plot(F)
quantile(L$GPa6, 0.05)
##  5% 
## 0.5
quantile(L$GPa6, 0.10)
##       10% 
## 0.5821429

TODO: using a model for log stiffness based on pre-sawing measures, redo this.

1.7 Dynamic v Static

Does it matter if we use Hitman instead of CLT results?

1.7.1 Using hitman and CHH density

bwplot( factor(SWILogNumber,levels=L$SWILogNumber[order(L$E.avg.dyn)],ordered=TRUE) ~ E.d.hitman, B)
# and again but with only the best and worst and with individual boards
(worst.dyn=L$SWILogNumber[L$E.avg<quantile(L$E.avg,0.1)])
##  [1] 101 163 168 179 184 187 193 205 207 214 218 221
(best.dyn=L$SWILogNumber[L$E.avg>quantile(L$E.avg,0.9)])
##  [1] 135 140 143 154 159 176 190 200 203 206 213 216
bwplot( factor(SWILogNumber,levels=L$SWILogNumber[order(L$E.avg)],ordered=TRUE) ~ E.d.hitman, B,subset=SWILogNumber %in% union(best.dyn,worst.dyn),
        panel=function(...){
          panel.bwplot(...)
          panel.points(...,col='red')
        }, main="Best and Worst 10% of logs")
intersect(best, best.dyn)
##  [1] 135 140 143 154 159 176 190 200 203 206 213 216
intersect(worst, worst.dyn)
##  [1] 101 163 168 179 184 187 193 205 207 214 218 221
plot(L$E.avg,L$E.avg.dyn)
plot(rank(L$E.avg),rank(L$E.avg.dyn))

No, we get the same sets of logs as best and worst using either hitman+chh.density or clt for board MOE.

From here on use Hitman and CHH density based board and log average MOE.

1.8 Pith Boards

Do all logs have a similar number of pith-in boards?

plot(L$SWILogNumber, L$nboards, ylim=c(0,max(L$nboards)))
points(L$SWILogNumber, L$npith, col='red')
table(L$npith)
## 
##  0  1  2  3  4 
##  5 43 58 13  1
L$SWILogNumber[L$npith==0]
## [1] 115 125 147 175 219

Typically 1 or 2 pith boards per log. BUT 7 logs with no pith boards (either not recovered or not properly classified), this might skew which logs appear to be best and worst. One of these seven is also a worst 10% log so probably not an issue.


Is the fraction of pith boards a good predictor of log average stiffness?

xyplot(E.avg.dyn ~ I(npith/nboards), L)

No.

1.9 Board Densities

1.9.1 Different estimators of dry density

pairs(B[,c('den.d.chh','den.d.chh.clear','den.d.lhg'),])

CHH clear (X_Clear) and average (X_Dens) densities are pretty similar.

Use the latter (X_Dens) in conjunction with SWV to estimate MOE.

1.9.2 Green vs dry density

xyplot(den.d.chh ~ den.g, B, group=paste("wane =",wane), auto.key=TRUE)

Most of the incredibly high green density boards are waney. Probably the green mass is good, but the green volume

1.10 Variation with Distance-from-pith

plot(pith ~ R, B)

Wow. There are pith containing boards whose LE position is 140-160 mm from pith at LE.

1.10.1 Density

mypanel = function(...) {
  panel.xyplot(...)
  panel.grid(h=-1,v=-1)
  panel.loess(..., col='red')
}
library(gridExtra)
## Loading required package: grid
library(lattice)
grid.arrange(
  xyplot(den.g ~ R, B, panel=mypanel, group=wane),
  xyplot(den.d.chh ~ R, B, panel=mypanel, group=wane),
  xyplot(den.d.lhg ~ R, B, panel=mypanel, group=wane),
  ncol=3)

1.10.2 MOE

grid.arrange(
  xyplot(E.g.corrected ~ R, B, panel=mypanel, group=wane),
  xyplot(E.d.chh.dyn ~ R, B, panel=mypanel, group=wane),
  xyplot(E.d.hitman ~ R, B, panel=mypanel, group=wane),
  ncol=3)

1.10.3 Warp

grid.arrange(
  xyplot(bow ~ R, B, panel=mypanel, group=wane),
  xyplot(crook ~ R, B, panel=mypanel, group=wane),
  xyplot(twist ~ R, B, panel=mypanel, group=wane),
  ncol=3)

Most of the plots above exhibit a slope discontinuity between \(R=100\) and \(R=150\) mm.

Lets call boards with \(R<100\) ‘inner’ and those with \(R>100\) mm ‘outer’.

1.11 Intra-Log Variation

1.11.1 Radial

Plot variation of moe, den, bow, crook, twist with R within individual logs

for (p in c("den.g","den.d.chh","E.d.chh.dyn","bow","crook","twist")) {
  print(
    xyplot(formula(paste(p,"~ R | as.factor(SWILogNumber)")), B, group=pith_wane, pch=c(1,19,19,19), main=p)#, auto.key=TRUE)
    )
  }

Some very odd arrangements of pith and waney boards (e.g log 137 where a pith board has R > than a wane board!)

1.11.2 2D

Todo: plot moe, den, bow, crook, twist using glyph size/color/fill over individual log saw patterns

library(ggplot2)
ii = is.finite(B$SWILogNumber) & is.finite(B$xc) & is.finite(B$yc)
for (p in c("den.g","den.d.chh","E.d.chh.dyn","bow","crook","twist")) {
  #B$sf=B[,p]/max(B[,p])
  #xyplot(yc ~ xc | as.factor(SWILogNumber), aspect='iso', B, cex=B$sf, pch=19, subset=is.finite(p))#, cex=p)#, auto.key=TRUE)
  
  # try ggplot2
  B$size=B[,p]
  print(
    ggplot(B[is.finite(B$size) & ii,], aes(xc,yc))
      + geom_point(aes(size=sqrt(abs(size)),col=size,alpha=0.9)) 
      + geom_point(col='black', shape="+") 
      + facet_wrap(~SWILogNumber) 
      + coord_fixed() # achieves aspect='iso'
    + scale_colour_gradientn(colours=rainbow(4))
    + ggtitle(p)
    )
  }

# to

Which logs are well represented?

Plot board positions and digitized large end information.

xyplot(y ~ x | as.factor(SWILogNumber), group=paste(logEnd,type), D, type="l", aspect='iso', 
       panel=function(x,y,subscripts,...){
          panel.grid(h=-1,y=-1)
          log = D$SWILogNumber[subscripts][1]
          ii = B$SWILogNumber==log
          panel.xyplot(B$xc[ii],B$yc[ii],pch=19,col='black', cex=0.5)
          panel.xyplot(x,y,subscripts=subscripts,...)
       })
# and so after much scrutinising...
near.complete.sawpatterns = c(213,217,219,220,221,223,212,210,108,111,125,119,114,128,144,150,154,164,188,186,197)

How is it that some boards fall outside of the large end? e.g. 103. Do I have the rotations correct?

1.12 Log SWV v average Board MOE

mypanel=function(x,y,...){
  #panel.abline(c(0,1), col='grey70', lty=2)
  panel.xyplot(x,y,...)
  m=lm(y ~ x)
  print(summary(m))
  panel.abline(coef(m),col='red')
}
#xyplot(E.avg ~ SWV, L, panel=mypanel) # hitman in yard
#xyplot(E.avg ~ velocity, L, subset=velocity>0, panel=mypanel) # calibre log tool
xyplot(E.avg.dyn ~ SWV, L, panel=mypanel) # hitman in yard
## 
## Call:
## lm(formula = y ~ x)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -3.5195 -0.6276  0.0632  0.7209  2.8354 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -4.6351108  1.4543727  -3.187  0.00184 ** 
## x            0.0041522  0.0004398   9.441 4.22e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.174 on 118 degrees of freedom
## Multiple R-squared:  0.4303, Adjusted R-squared:  0.4255 
## F-statistic: 89.14 on 1 and 118 DF,  p-value: 4.216e-16
#xyplot(E.avg.dyn ~ velocity, L, subset=velocity>0, panel=mypanel) # calibre log tool

Ugly.

1.13 Warp

1.13.1 Per Log Distributions

bwpanel=function(...){
          panel.bwplot(...)
          panel.points(...,col='red', cex=0.3)
        }
bwplot( factor(SWILogNumber,levels=L$SWILogNumber[order(L$bow_p75)],ordered=TRUE) ~ bow, B, panel=bwpanel)
bwplot( factor(SWILogNumber,levels=L$SWILogNumber[order(L$crook_p75)],ordered=TRUE) ~ crook, B, panel=bwpanel)
bwplot( factor(SWILogNumber,levels=L$SWILogNumber[order(L$twist_p75)],ordered=TRUE) ~ twist, B, panel=bwpanel)

1.13.2 Correlations

1.13.2.1 Between Log Quality Measures

log.quality.measures = c("E.avg.dyn",
                         "crook_avg","crook_p75","crook_avg_inner","crook_avg_outer",
                         "bow_avg","bow_p75","bow_avg_outer","bow_avg_inner",
                         "twist_avg")
pairs(L[,log.quality.measures], 
      lower.panel=function(x,y,...) {
        usr <- par("usr"); on.exit(par(usr))
        par(usr = c(0, 1, 0, 1))
        ii=is.finite(x) & is.finite(y)
        r <- cor(x[ii], y[ii])
        txt <- format(c(r, 0.123456789), digits = 2)[1]
        #txt <- paste0("r=", txt)
        #cex.cor <- 0.8/strwidth(txt)
        text(0.5, 0.5, txt, cex = 1.8 * abs(r))
})

Average and 75th percentile bow and crook strongly correlated. Consider only average from here on.

1.13.2.2 Log Q vs Predictors

log.quality.measures = c("E.avg.dyn",
                         "crook_avg","crook_avg_inner","crook_avg_outer",
                         "bow_avg","bow_avg_outer","bow_avg_inner",
                         "twist_avg")
plots <- list()
for (p in predictors) {
  for (l in log.quality.measures) {
    plots <- c(plots, list(xyplot(L[,l] ~ L[,p], xlab=p, ylab=l)))
  }
}
do.call(grid.arrange, c(plots, ncol=length(predictors)))

Twist turns out to be surprisingly predictable (see below). Is this due to correlation with stiffness?

xyplot(E.d.hitman_avg ~ twist_avg, L)
summary(lm(E.d.hitman_avg ~ twist_avg, L))
## 
## Call:
## lm(formula = E.d.hitman_avg ~ twist_avg, data = L)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -4.7376 -0.9751 -0.0434  0.9902  4.0227 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) 10.06987    0.22902  43.969  < 2e-16 ***
## twist_avg   -0.33020    0.06214  -5.314 5.14e-07 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.397 on 118 degrees of freedom
## Multiple R-squared:  0.1931, Adjusted R-squared:  0.1862 
## F-statistic: 28.23 on 1 and 118 DF,  p-value: 5.144e-07

2 Modelling

2.1 Stiffness

Find the best linear model for log average MOE.

summary(m <- lm(E.avg.dyn ~ (m_volume+SWV+m_led+m_sed+m_a0+m_a1+m_a2+m_taper+m_waist+m_ovality+m_whorliness+m_sweep1+m_sweep2+weight+hw.vfrac), L, subset=!is.na(L$m_sed)))
## 
## Call:
## lm(formula = E.avg.dyn ~ (m_volume + SWV + m_led + m_sed + m_a0 + 
##     m_a1 + m_a2 + m_taper + m_waist + m_ovality + m_whorliness + 
##     m_sweep1 + m_sweep2 + weight + hw.vfrac), data = L, subset = !is.na(L$m_sed))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -3.2509 -0.3997 -0.0257  0.4779  1.5447 
## 
## Coefficients:
##                Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  -6.231e+00  2.312e+00  -2.695 0.008338 ** 
## m_volume     -1.143e+01  6.716e+00  -1.701 0.092233 .  
## SWV           4.732e-03  3.865e-04  12.245  < 2e-16 ***
## m_led         3.510e-02  1.543e-02   2.275 0.025159 *  
## m_sed        -4.762e-03  1.450e-02  -0.328 0.743307    
## m_a0         -2.428e-02  2.419e-02  -1.004 0.318169    
## m_a1          1.139e-01  1.612e-01   0.707 0.481588    
## m_a2          2.172e-01  1.638e-01   1.327 0.187840    
## m_taper      -7.032e-01  7.591e-01  -0.926 0.356639    
## m_waist      -8.948e+00  1.100e+01  -0.814 0.417784    
## m_ovality     7.253e+01  1.144e+02   0.634 0.527511    
## m_whorliness -3.975e-01  3.351e-01  -1.186 0.238467    
## m_sweep1     -1.266e-02  1.347e-01  -0.094 0.925286    
## m_sweep2     -6.431e-02  9.161e-01  -0.070 0.944189    
## weight        9.605e-03  5.118e-03   1.877 0.063664 .  
## hw.vfrac     -4.964e+00  1.297e+00  -3.829 0.000232 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.794 on 94 degrees of freedom
## Multiple R-squared:  0.7536, Adjusted R-squared:  0.7143 
## F-statistic: 19.16 on 15 and 94 DF,  p-value: < 2.2e-16
summary(m.best <- step(m, direction="both"))
## Start:  AIC=-36.04
## E.avg.dyn ~ (m_volume + SWV + m_led + m_sed + m_a0 + m_a1 + m_a2 + 
##     m_taper + m_waist + m_ovality + m_whorliness + m_sweep1 + 
##     m_sweep2 + weight + hw.vfrac)
## 
##                Df Sum of Sq     RSS     AIC
## - m_sweep2      1     0.003  59.263 -38.035
## - m_sweep1      1     0.006  59.265 -38.030
## - m_sed         1     0.068  59.328 -37.914
## - m_ovality     1     0.254  59.513 -37.571
## - m_a1          1     0.315  59.575 -37.458
## - m_waist       1     0.418  59.677 -37.268
## - m_taper       1     0.541  59.801 -37.041
## - m_a0          1     0.635  59.895 -36.868
## - m_whorliness  1     0.887  60.147 -36.405
## <none>                       59.260 -36.040
## - m_a2          1     1.110  60.369 -36.000
## - m_volume      1     1.824  61.084 -34.705
## - weight        1     2.220  61.480 -33.994
## - m_led         1     3.264  62.524 -32.143
## - hw.vfrac      1     9.243  68.503 -22.096
## - SWV           1    94.526 153.786  66.859
## 
## Step:  AIC=-38.03
## E.avg.dyn ~ m_volume + SWV + m_led + m_sed + m_a0 + m_a1 + m_a2 + 
##     m_taper + m_waist + m_ovality + m_whorliness + m_sweep1 + 
##     weight + hw.vfrac
## 
##                Df Sum of Sq     RSS     AIC
## - m_sweep1      1     0.009  59.272 -40.017
## - m_sed         1     0.074  59.337 -39.897
## - m_ovality     1     0.253  59.516 -39.565
## - m_a1          1     0.337  59.599 -39.412
## - m_waist       1     0.424  59.687 -39.250
## - m_taper       1     0.571  59.834 -38.980
## - m_a0          1     0.643  59.906 -38.847
## - m_whorliness  1     1.004  60.267 -38.186
## <none>                       59.263 -38.035
## - m_a2          1     1.192  60.455 -37.844
## - m_volume      1     2.063  61.326 -36.270
## + m_sweep2      1     0.003  59.260 -36.040
## - weight        1     2.380  61.643 -35.703
## - m_led         1     3.261  62.524 -34.143
## - hw.vfrac      1     9.462  68.725 -23.740
## - SWV           1    99.132 158.395  68.107
## 
## Step:  AIC=-40.02
## E.avg.dyn ~ m_volume + SWV + m_led + m_sed + m_a0 + m_a1 + m_a2 + 
##     m_taper + m_waist + m_ovality + m_whorliness + weight + hw.vfrac
## 
##                Df Sum of Sq     RSS     AIC
## - m_sed         1     0.078  59.350 -41.872
## - m_ovality     1     0.255  59.527 -41.546
## - m_a1          1     0.331  59.603 -41.404
## - m_waist       1     0.420  59.692 -41.241
## - m_taper       1     0.565  59.837 -40.975
## - m_a0          1     0.643  59.915 -40.831
## - m_whorliness  1     1.025  60.298 -40.131
## <none>                       59.272 -40.017
## - m_a2          1     1.183  60.455 -39.844
## - m_volume      1     2.063  61.335 -38.253
## + m_sweep1      1     0.009  59.263 -38.035
## + m_sweep2      1     0.007  59.265 -38.030
## - weight        1     2.378  61.650 -37.690
## - m_led         1     3.252  62.524 -36.142
## - hw.vfrac      1     9.546  68.819 -25.591
## - SWV           1   100.231 159.503  66.874
## 
## Step:  AIC=-41.87
## E.avg.dyn ~ m_volume + SWV + m_led + m_a0 + m_a1 + m_a2 + m_taper + 
##     m_waist + m_ovality + m_whorliness + weight + hw.vfrac
## 
##                Df Sum of Sq     RSS     AIC
## - m_ovality     1     0.251  59.601 -43.408
## - m_a1          1     0.309  59.660 -43.301
## - m_waist       1     0.415  59.765 -43.106
## - m_taper       1     0.537  59.887 -42.882
## - m_whorliness  1     0.985  60.336 -42.062
## <none>                       59.350 -41.872
## - m_a2          1     1.143  60.493 -41.775
## - m_a0          1     1.316  60.666 -41.460
## - m_volume      1     2.012  61.363 -40.205
## + m_sed         1     0.078  59.272 -40.017
## + m_sweep2      1     0.016  59.334 -39.902
## + m_sweep1      1     0.014  59.337 -39.897
## - weight        1     2.301  61.651 -39.688
## - m_led         1     3.257  62.607 -37.996
## - hw.vfrac      1    10.161  69.512 -26.488
## - SWV           1   100.259 159.610  64.948
## 
## Step:  AIC=-43.41
## E.avg.dyn ~ m_volume + SWV + m_led + m_a0 + m_a1 + m_a2 + m_taper + 
##     m_waist + m_whorliness + weight + hw.vfrac
## 
##                Df Sum of Sq     RSS     AIC
## - m_a1          1     0.321  59.923 -44.817
## - m_waist       1     0.426  60.027 -44.625
## - m_taper       1     0.557  60.158 -44.385
## <none>                       59.601 -43.408
## - m_a2          1     1.176  60.777 -43.259
## - m_whorliness  1     1.245  60.847 -43.134
## - m_a0          1     1.364  60.965 -42.920
## + m_ovality     1     0.251  59.350 -41.872
## - m_volume      1     2.101  61.702 -41.598
## + m_sed         1     0.074  59.527 -41.546
## + m_sweep2      1     0.016  59.586 -41.437
## + m_sweep1      1     0.015  59.586 -41.436
## - weight        1     2.257  61.858 -41.319
## - m_led         1     3.592  63.194 -38.970
## - hw.vfrac      1    10.097  69.698 -28.194
## - SWV           1   100.477 160.079  63.270
## 
## Step:  AIC=-44.82
## E.avg.dyn ~ m_volume + SWV + m_led + m_a0 + m_a2 + m_taper + 
##     m_waist + m_whorliness + weight + hw.vfrac
## 
##                Df Sum of Sq     RSS     AIC
## - m_waist       1     0.860  60.783 -45.248
## - m_a2          1     0.939  60.862 -45.106
## <none>                       59.923 -44.817
## - m_whorliness  1     1.184  61.107 -44.664
## - m_a0          1     1.593  61.515 -43.931
## - m_volume      1     1.807  61.730 -43.548
## + m_a1          1     0.321  59.601 -43.408
## + m_ovality     1     0.263  59.660 -43.301
## - weight        1     2.006  61.929 -43.195
## + m_sed         1     0.053  59.870 -42.913
## + m_sweep2      1     0.041  59.882 -42.892
## + m_sweep1      1     0.008  59.915 -42.831
## - m_taper       1     2.456  62.379 -42.398
## - m_led         1     3.751  63.673 -40.139
## - hw.vfrac      1    10.857  70.780 -28.499
## - SWV           1   104.379 164.302  64.135
## 
## Step:  AIC=-45.25
## E.avg.dyn ~ m_volume + SWV + m_led + m_a0 + m_a2 + m_taper + 
##     m_whorliness + weight + hw.vfrac
## 
##                Df Sum of Sq     RSS     AIC
## <none>                       60.783 -45.248
## - m_whorliness  1     1.216  61.999 -45.069
## + m_waist       1     0.860  59.923 -44.817
## + m_a1          1     0.756  60.027 -44.625
## - m_volume      1     1.750  62.533 -44.126
## + m_ovality     1     0.289  60.494 -43.773
## - m_a2          1     1.987  62.770 -43.710
## + m_sweep2      1     0.089  60.694 -43.410
## - weight        1     2.188  62.971 -43.359
## + m_sed         1     0.035  60.748 -43.312
## + m_sweep1      1     0.001  60.783 -43.249
## - m_a0          1     2.385  63.168 -43.015
## - m_taper       1     3.191  63.974 -41.621
## - m_led         1     4.962  65.745 -38.617
## - hw.vfrac      1    10.426  71.210 -29.834
## - SWV           1   104.472 165.255  62.771
## 
## Call:
## lm(formula = E.avg.dyn ~ m_volume + SWV + m_led + m_a0 + m_a2 + 
##     m_taper + m_whorliness + weight + hw.vfrac, data = L, subset = !is.na(L$m_sed))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -3.2810 -0.3804  0.0230  0.5119  1.6595 
## 
## Coefficients:
##                Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  -6.139e+00  2.112e+00  -2.906   0.0045 ** 
## m_volume     -1.009e+01  5.944e+00  -1.697   0.0929 .  
## SWV           4.780e-03  3.646e-04  13.110  < 2e-16 ***
## m_led         4.137e-02  1.448e-02   2.857   0.0052 ** 
## m_a0         -3.677e-02  1.857e-02  -1.981   0.0504 .  
## m_a2          5.867e-03  3.244e-03   1.808   0.0736 .  
## m_taper      -1.921e-01  8.384e-02  -2.291   0.0241 *  
## m_whorliness -4.325e-01  3.058e-01  -1.414   0.1603    
## weight        8.878e-03  4.679e-03   1.897   0.0607 .  
## hw.vfrac     -5.030e+00  1.215e+00  -4.142 7.22e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.7796 on 100 degrees of freedom
## Multiple R-squared:  0.7472, Adjusted R-squared:  0.7245 
## F-statistic: 32.85 on 9 and 100 DF,  p-value: < 2.2e-16
m.best$anova
##          Step Df    Deviance Resid. Df Resid. Dev       AIC
## 1             NA          NA        94   59.25986 -36.04030
## 2  - m_sweep2  1 0.003106191        95   59.26296 -38.03454
## 3  - m_sweep1  1 0.009235583        96   59.27220 -40.01740
## 4     - m_sed  1 0.078248157        97   59.35045 -41.87228
## 5 - m_ovality  1 0.250911162        98   59.60136 -43.40822
## 6      - m_a1  1 0.321454593        99   59.92281 -44.81654
## 7   - m_waist  1 0.860445923       100   60.78326 -45.24825
m.best <- step(m, direction="backward")
## Start:  AIC=-36.04
## E.avg.dyn ~ (m_volume + SWV + m_led + m_sed + m_a0 + m_a1 + m_a2 + 
##     m_taper + m_waist + m_ovality + m_whorliness + m_sweep1 + 
##     m_sweep2 + weight + hw.vfrac)
## 
##                Df Sum of Sq     RSS     AIC
## - m_sweep2      1     0.003  59.263 -38.035
## - m_sweep1      1     0.006  59.265 -38.030
## - m_sed         1     0.068  59.328 -37.914
## - m_ovality     1     0.254  59.513 -37.571
## - m_a1          1     0.315  59.575 -37.458
## - m_waist       1     0.418  59.677 -37.268
## - m_taper       1     0.541  59.801 -37.041
## - m_a0          1     0.635  59.895 -36.868
## - m_whorliness  1     0.887  60.147 -36.405
## <none>                       59.260 -36.040
## - m_a2          1     1.110  60.369 -36.000
## - m_volume      1     1.824  61.084 -34.705
## - weight        1     2.220  61.480 -33.994
## - m_led         1     3.264  62.524 -32.143
## - hw.vfrac      1     9.243  68.503 -22.096
## - SWV           1    94.526 153.786  66.859
## 
## Step:  AIC=-38.03
## E.avg.dyn ~ m_volume + SWV + m_led + m_sed + m_a0 + m_a1 + m_a2 + 
##     m_taper + m_waist + m_ovality + m_whorliness + m_sweep1 + 
##     weight + hw.vfrac
## 
##                Df Sum of Sq     RSS     AIC
## - m_sweep1      1     0.009  59.272 -40.017
## - m_sed         1     0.074  59.337 -39.897
## - m_ovality     1     0.253  59.516 -39.565
## - m_a1          1     0.337  59.599 -39.412
## - m_waist       1     0.424  59.687 -39.250
## - m_taper       1     0.571  59.834 -38.980
## - m_a0          1     0.643  59.906 -38.847
## - m_whorliness  1     1.004  60.267 -38.186
## <none>                       59.263 -38.035
## - m_a2          1     1.192  60.455 -37.844
## - m_volume      1     2.063  61.326 -36.270
## - weight        1     2.380  61.643 -35.703
## - m_led         1     3.261  62.524 -34.143
## - hw.vfrac      1     9.462  68.725 -23.740
## - SWV           1    99.132 158.395  68.107
## 
## Step:  AIC=-40.02
## E.avg.dyn ~ m_volume + SWV + m_led + m_sed + m_a0 + m_a1 + m_a2 + 
##     m_taper + m_waist + m_ovality + m_whorliness + weight + hw.vfrac
## 
##                Df Sum of Sq     RSS     AIC
## - m_sed         1     0.078  59.350 -41.872
## - m_ovality     1     0.255  59.527 -41.546
## - m_a1          1     0.331  59.603 -41.404
## - m_waist       1     0.420  59.692 -41.241
## - m_taper       1     0.565  59.837 -40.975
## - m_a0          1     0.643  59.915 -40.831
## - m_whorliness  1     1.025  60.298 -40.131
## <none>                       59.272 -40.017
## - m_a2          1     1.183  60.455 -39.844
## - m_volume      1     2.063  61.335 -38.253
## - weight        1     2.378  61.650 -37.690
## - m_led         1     3.252  62.524 -36.142
## - hw.vfrac      1     9.546  68.819 -25.591
## - SWV           1   100.231 159.503  66.874
## 
## Step:  AIC=-41.87
## E.avg.dyn ~ m_volume + SWV + m_led + m_a0 + m_a1 + m_a2 + m_taper + 
##     m_waist + m_ovality + m_whorliness + weight + hw.vfrac
## 
##                Df Sum of Sq     RSS     AIC
## - m_ovality     1     0.251  59.601 -43.408
## - m_a1          1     0.309  59.660 -43.301
## - m_waist       1     0.415  59.765 -43.106
## - m_taper       1     0.537  59.887 -42.882
## - m_whorliness  1     0.985  60.336 -42.062
## <none>                       59.350 -41.872
## - m_a2          1     1.143  60.493 -41.775
## - m_a0          1     1.316  60.666 -41.460
## - m_volume      1     2.012  61.363 -40.205
## - weight        1     2.301  61.651 -39.688
## - m_led         1     3.257  62.607 -37.996
## - hw.vfrac      1    10.161  69.512 -26.488
## - SWV           1   100.259 159.610  64.948
## 
## Step:  AIC=-43.41
## E.avg.dyn ~ m_volume + SWV + m_led + m_a0 + m_a1 + m_a2 + m_taper + 
##     m_waist + m_whorliness + weight + hw.vfrac
## 
##                Df Sum of Sq     RSS     AIC
## - m_a1          1     0.321  59.923 -44.817
## - m_waist       1     0.426  60.027 -44.625
## - m_taper       1     0.557  60.158 -44.385
## <none>                       59.601 -43.408
## - m_a2          1     1.176  60.777 -43.259
## - m_whorliness  1     1.245  60.847 -43.134
## - m_a0          1     1.364  60.965 -42.920
## - m_volume      1     2.101  61.702 -41.598
## - weight        1     2.257  61.858 -41.319
## - m_led         1     3.592  63.194 -38.970
## - hw.vfrac      1    10.097  69.698 -28.194
## - SWV           1   100.477 160.079  63.270
## 
## Step:  AIC=-44.82
## E.avg.dyn ~ m_volume + SWV + m_led + m_a0 + m_a2 + m_taper + 
##     m_waist + m_whorliness + weight + hw.vfrac
## 
##                Df Sum of Sq     RSS     AIC
## - m_waist       1     0.860  60.783 -45.248
## - m_a2          1     0.939  60.862 -45.106
## <none>                       59.923 -44.817
## - m_whorliness  1     1.184  61.107 -44.664
## - m_a0          1     1.593  61.515 -43.931
## - m_volume      1     1.807  61.730 -43.548
## - weight        1     2.006  61.929 -43.195
## - m_taper       1     2.456  62.379 -42.398
## - m_led         1     3.751  63.673 -40.139
## - hw.vfrac      1    10.857  70.780 -28.499
## - SWV           1   104.379 164.302  64.135
## 
## Step:  AIC=-45.25
## E.avg.dyn ~ m_volume + SWV + m_led + m_a0 + m_a2 + m_taper + 
##     m_whorliness + weight + hw.vfrac
## 
##                Df Sum of Sq     RSS     AIC
## <none>                       60.783 -45.248
## - m_whorliness  1     1.216  61.999 -45.069
## - m_volume      1     1.750  62.533 -44.126
## - m_a2          1     1.987  62.770 -43.710
## - weight        1     2.188  62.971 -43.359
## - m_a0          1     2.385  63.168 -43.015
## - m_taper       1     3.191  63.974 -41.621
## - m_led         1     4.962  65.745 -38.617
## - hw.vfrac      1    10.426  71.210 -29.834
## - SWV           1   104.472 165.255  62.771
summary(m.best <- step(lm(E.avg.dyn ~ SWV, L, subset=!is.na(L$m_sed)), direction="forward", scope=E.avg.dyn ~ (SWV+m_volume+m_led+m_sed+m_a0+m_a1+m_a2+m_taper+m_waist+m_ovality+m_whorliness+m_sweep1+m_sweep2+volume+weight+density+hw.vfrac)))
## Start:  AIC=26.03
## E.avg.dyn ~ SWV
## 
##                Df Sum of Sq     RSS     AIC
## + density       1    60.264  74.123 -37.424
## + hw.vfrac      1    52.694  81.692 -26.728
## + weight        1    16.594 117.792  13.529
## + m_led         1    10.528 123.858  19.052
## + m_a0          1     9.871 124.515  19.634
## + m_volume      1     9.739 124.648  19.751
## + volume        1     9.636 124.750  19.842
## + m_sed         1     9.588 124.798  19.884
## + m_a2          1     8.758 125.628  20.613
## + m_waist       1     8.613 125.773  20.740
## + m_whorliness  1     7.234 127.152  21.939
## + m_a1          1     7.069 127.318  22.083
## + m_sweep2      1     2.987 131.400  25.554
## <none>                      134.386  26.026
## + m_taper       1     0.740 133.646  27.418
## + m_ovality     1     0.495 133.891  27.620
## + m_sweep1      1     0.483 133.903  27.630
## 
## Step:  AIC=-37.42
## E.avg.dyn ~ SWV + density
## 
##                Df Sum of Sq    RSS     AIC
## + m_a2          1    4.9358 69.187 -43.004
## + m_waist       1    4.8878 69.235 -42.927
## + m_a1          1    4.5433 69.579 -42.381
## + m_led         1    4.0844 70.038 -41.658
## + m_a0          1    3.8873 70.235 -41.349
## + m_volume      1    3.6608 70.462 -40.995
## + volume        1    3.6094 70.513 -40.915
## + m_sed         1    3.6069 70.516 -40.911
## + weight        1    3.6037 70.519 -40.906
## + hw.vfrac      1    2.9957 71.127 -39.962
## + m_whorliness  1    2.5171 71.606 -39.224
## <none>                      74.123 -37.424
## + m_ovality     1    0.3689 73.754 -35.972
## + m_taper       1    0.1187 74.004 -35.600
## + m_sweep2      1    0.0253 74.097 -35.461
## + m_sweep1      1    0.0001 74.123 -35.424
## 
## Step:  AIC=-43
## E.avg.dyn ~ SWV + density + m_a2
## 
##                Df Sum of Sq    RSS     AIC
## + hw.vfrac      1    4.9345 64.252 -49.143
## + m_whorliness  1    2.5644 66.622 -45.158
## + m_volume      1    1.7599 67.427 -43.838
## + weight        1    1.7294 67.457 -43.788
## + volume        1    1.7288 67.458 -43.787
## + m_a0          1    1.7184 67.468 -43.770
## + m_sed         1    1.6642 67.523 -43.682
## + m_led         1    1.6173 67.569 -43.606
## <none>                      69.187 -43.004
## + m_ovality     1    0.5706 68.616 -41.915
## + m_waist       1    0.1792 69.008 -41.289
## + m_sweep1      1    0.1372 69.050 -41.222
## + m_taper       1    0.0946 69.092 -41.154
## + m_a1          1    0.0890 69.098 -41.145
## + m_sweep2      1    0.0438 69.143 -41.073
## 
## Step:  AIC=-49.14
## E.avg.dyn ~ SWV + density + m_a2 + hw.vfrac
## 
##                Df Sum of Sq    RSS     AIC
## + m_led         1   1.47227 62.780 -49.693
## + m_a0          1   1.43202 62.820 -49.622
## + m_sed         1   1.41226 62.840 -49.588
## + m_whorliness  1   1.40172 62.851 -49.569
## + m_volume      1   1.35472 62.898 -49.487
## + volume        1   1.29532 62.957 -49.383
## + weight        1   1.26876 62.984 -49.337
## <none>                      64.252 -49.143
## + m_ovality     1   0.90857 63.344 -48.709
## + m_waist       1   0.80130 63.451 -48.523
## + m_sweep2      1   0.19505 64.057 -47.477
## + m_taper       1   0.06756 64.185 -47.259
## + m_a1          1   0.05706 64.195 -47.241
## + m_sweep1      1   0.00290 64.249 -47.148
## 
## Step:  AIC=-49.69
## E.avg.dyn ~ SWV + density + m_a2 + hw.vfrac + m_led
## 
##                Df Sum of Sq    RSS     AIC
## + m_whorliness  1   2.13914 60.641 -51.506
## <none>                      62.780 -49.693
## + m_waist       1   0.81443 61.966 -49.129
## + m_ovality     1   0.64675 62.133 -48.832
## + m_taper       1   0.48004 62.300 -48.537
## + m_a1          1   0.45018 62.330 -48.484
## + m_sweep2      1   0.16922 62.611 -47.990
## + volume        1   0.09674 62.683 -47.862
## + weight        1   0.08944 62.691 -47.850
## + m_volume      1   0.02707 62.753 -47.740
## + m_a0          1   0.00299 62.777 -47.698
## + m_sweep1      1   0.00170 62.778 -47.696
## + m_sed         1   0.00088 62.779 -47.694
## 
## Step:  AIC=-51.51
## E.avg.dyn ~ SWV + density + m_a2 + hw.vfrac + m_led + m_whorliness
## 
##             Df Sum of Sq    RSS     AIC
## <none>                   60.641 -51.506
## + weight     1   0.96063 59.680 -51.263
## + volume     1   0.93030 59.711 -51.207
## + m_waist    1   0.77991 59.861 -50.930
## + m_volume   1   0.59059 60.050 -50.583
## + m_ovality  1   0.34718 60.294 -50.138
## + m_sed      1   0.27563 60.365 -50.007
## + m_a0       1   0.20815 60.433 -49.884
## + m_taper    1   0.03885 60.602 -49.577
## + m_a1       1   0.03030 60.611 -49.561
## + m_sweep1   1   0.02083 60.620 -49.544
## + m_sweep2   1   0.00325 60.638 -49.512
## 
## Call:
## lm(formula = E.avg.dyn ~ SWV + density + m_a2 + hw.vfrac + m_led + 
##     m_whorliness, data = L, subset = !is.na(L$m_sed))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -3.6602 -0.4242  0.0010  0.4909  1.6757 
## 
## Coefficients:
##                Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  -1.284e+01  2.340e+00  -5.486 2.96e-07 ***
## SWV           4.923e-03  3.376e-04  14.583  < 2e-16 ***
## density       6.447e-03  1.890e-03   3.412 0.000924 ***
## m_a2          6.458e-03  2.759e-03   2.340 0.021205 *  
## hw.vfrac     -3.054e+00  1.275e+00  -2.394 0.018475 *  
## m_led         2.272e-03  1.172e-03   1.937 0.055445 .  
## m_whorliness -5.163e-01  2.709e-01  -1.906 0.059419 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.7673 on 103 degrees of freedom
## Multiple R-squared:  0.7478, Adjusted R-squared:  0.7331 
## F-statistic: 50.91 on 6 and 103 DF,  p-value: < 2.2e-16
summary(m.best.interactions <- step(lm(E.avg.dyn ~ SWV, L, subset=!is.na(L$m_sed)), direction="forward", scope=E.avg.dyn ~ (SWV+m_volume+m_led+m_sed+m_a0+m_a1+m_a2+m_taper+m_waist+m_ovality+m_whorliness+m_sweep1+m_sweep2+weight+density+hw.vfrac)^2))
## Start:  AIC=26.03
## E.avg.dyn ~ SWV
## 
##                Df Sum of Sq     RSS     AIC
## + density       1    60.264  74.123 -37.424
## + hw.vfrac      1    52.694  81.692 -26.728
## + weight        1    16.594 117.792  13.529
## + m_led         1    10.528 123.858  19.052
## + m_a0          1     9.871 124.515  19.634
## + m_volume      1     9.739 124.648  19.751
## + m_sed         1     9.588 124.798  19.884
## + m_a2          1     8.758 125.628  20.613
## + m_waist       1     8.613 125.773  20.740
## + m_whorliness  1     7.234 127.152  21.939
## + m_a1          1     7.069 127.318  22.083
## + m_sweep2      1     2.987 131.400  25.554
## <none>                      134.386  26.026
## + m_taper       1     0.740 133.646  27.418
## + m_ovality     1     0.495 133.891  27.620
## + m_sweep1      1     0.483 133.903  27.630
## 
## Step:  AIC=-37.42
## E.avg.dyn ~ SWV + density
## 
##                Df Sum of Sq    RSS     AIC
## + m_a2          1    4.9358 69.187 -43.004
## + m_waist       1    4.8878 69.235 -42.927
## + m_a1          1    4.5433 69.579 -42.381
## + m_led         1    4.0844 70.038 -41.658
## + m_a0          1    3.8873 70.235 -41.349
## + m_volume      1    3.6608 70.462 -40.995
## + m_sed         1    3.6069 70.516 -40.911
## + weight        1    3.6037 70.519 -40.906
## + hw.vfrac      1    2.9957 71.127 -39.962
## + m_whorliness  1    2.5171 71.606 -39.224
## <none>                      74.123 -37.424
## + m_ovality     1    0.3689 73.754 -35.972
## + SWV:density   1    0.3505 73.772 -35.945
## + m_taper       1    0.1187 74.004 -35.600
## + m_sweep2      1    0.0253 74.097 -35.461
## + m_sweep1      1    0.0001 74.123 -35.424
## 
## Step:  AIC=-43
## E.avg.dyn ~ SWV + density + m_a2
## 
##                Df Sum of Sq    RSS     AIC
## + hw.vfrac      1    4.9345 64.252 -49.143
## + m_whorliness  1    2.5644 66.622 -45.158
## + m_a2:density  1    2.0225 67.164 -44.267
## + m_volume      1    1.7599 67.427 -43.838
## + weight        1    1.7294 67.457 -43.788
## + m_a0          1    1.7184 67.468 -43.770
## + SWV:m_a2      1    1.6697 67.517 -43.691
## + m_sed         1    1.6642 67.523 -43.682
## + m_led         1    1.6173 67.569 -43.606
## <none>                      69.187 -43.004
## + m_ovality     1    0.5706 68.616 -41.915
## + SWV:density   1    0.2701 68.917 -41.434
## + m_waist       1    0.1792 69.008 -41.289
## + m_sweep1      1    0.1372 69.050 -41.222
## + m_taper       1    0.0946 69.092 -41.154
## + m_a1          1    0.0890 69.098 -41.145
## + m_sweep2      1    0.0438 69.143 -41.073
## 
## Step:  AIC=-49.14
## E.avg.dyn ~ SWV + density + m_a2 + hw.vfrac
## 
##                    Df Sum of Sq    RSS     AIC
## + m_led             1   1.47227 62.780 -49.693
## + m_a0              1   1.43202 62.820 -49.622
## + m_sed             1   1.41226 62.840 -49.588
## + m_whorliness      1   1.40172 62.851 -49.569
## + density:hw.vfrac  1   1.37324 62.879 -49.519
## + m_volume          1   1.35472 62.898 -49.487
## + weight            1   1.26876 62.984 -49.337
## <none>                          64.252 -49.143
## + SWV:m_a2          1   1.15660 63.096 -49.141
## + m_a2:density      1   1.12201 63.130 -49.081
## + m_ovality         1   0.90857 63.344 -48.709
## + m_waist           1   0.80130 63.451 -48.523
## + m_a2:hw.vfrac     1   0.58861 63.664 -48.155
## + SWV:density       1   0.41774 63.835 -47.860
## + SWV:hw.vfrac      1   0.23513 64.017 -47.546
## + m_sweep2          1   0.19505 64.057 -47.477
## + m_taper           1   0.06756 64.185 -47.259
## + m_a1              1   0.05706 64.195 -47.241
## + m_sweep1          1   0.00290 64.249 -47.148
## 
## Step:  AIC=-49.69
## E.avg.dyn ~ SWV + density + m_a2 + hw.vfrac + m_led
## 
##                    Df Sum of Sq    RSS     AIC
## + m_whorliness      1   2.13914 60.641 -51.506
## + SWV:m_a2          1   1.27611 61.504 -49.952
## <none>                          62.780 -49.693
## + m_a2:density      1   1.12595 61.654 -49.683
## + density:hw.vfrac  1   1.11724 61.663 -49.668
## + m_led:m_a2        1   0.95369 61.826 -49.377
## + m_waist           1   0.81443 61.966 -49.129
## + m_ovality         1   0.64675 62.133 -48.832
## + m_a2:hw.vfrac     1   0.58417 62.196 -48.721
## + m_taper           1   0.48004 62.300 -48.537
## + m_a1              1   0.45018 62.330 -48.484
## + SWV:density       1   0.33635 62.444 -48.284
## + m_sweep2          1   0.16922 62.611 -47.990
## + m_led:hw.vfrac    1   0.15670 62.623 -47.968
## + SWV:hw.vfrac      1   0.15313 62.627 -47.961
## + weight            1   0.08944 62.691 -47.850
## + m_led:density     1   0.03609 62.744 -47.756
## + m_volume          1   0.02707 62.753 -47.740
## + m_a0              1   0.00299 62.777 -47.698
## + m_sweep1          1   0.00170 62.778 -47.696
## + SWV:m_led         1   0.00153 62.779 -47.695
## + m_sed             1   0.00088 62.779 -47.694
## 
## Step:  AIC=-51.51
## E.avg.dyn ~ SWV + density + m_a2 + hw.vfrac + m_led + m_whorliness
## 
##                         Df Sum of Sq    RSS     AIC
## + density:hw.vfrac       1   1.49936 59.142 -52.260
## + SWV:m_whorliness       1   1.22896 59.412 -51.758
## <none>                               60.641 -51.506
## + weight                 1   0.96063 59.680 -51.263
## + m_whorliness:density   1   0.87079 59.770 -51.097
## + m_led:m_a2             1   0.78211 59.859 -50.934
## + m_waist                1   0.77991 59.861 -50.930
## + m_a2:density           1   0.76656 59.874 -50.906
## + SWV:m_a2               1   0.75462 59.886 -50.884
## + m_led:hw.vfrac         1   0.60165 60.039 -50.603
## + m_volume               1   0.59059 60.050 -50.583
## + SWV:density            1   0.50910 60.132 -50.434
## + m_ovality              1   0.34718 60.294 -50.138
## + m_led:density          1   0.32360 60.317 -50.095
## + m_whorliness:hw.vfrac  1   0.30171 60.339 -50.055
## + m_a2:hw.vfrac          1   0.27653 60.364 -50.009
## + m_sed                  1   0.27563 60.365 -50.007
## + SWV:hw.vfrac           1   0.22164 60.419 -49.909
## + m_a0                   1   0.20815 60.433 -49.884
## + SWV:m_led              1   0.10778 60.533 -49.702
## + m_led:m_whorliness     1   0.04617 60.595 -49.590
## + m_taper                1   0.03885 60.602 -49.577
## + m_a1                   1   0.03030 60.611 -49.561
## + m_sweep1               1   0.02083 60.620 -49.544
## + m_sweep2               1   0.00325 60.638 -49.512
## + m_a2:m_whorliness      1   0.00149 60.639 -49.509
## 
## Step:  AIC=-52.26
## E.avg.dyn ~ SWV + density + m_a2 + hw.vfrac + m_led + m_whorliness + 
##     density:hw.vfrac
## 
##                         Df Sum of Sq    RSS     AIC
## + SWV:m_whorliness       1   1.15777 57.984 -52.435
## <none>                               59.142 -52.260
## + m_whorliness:density   1   0.90783 58.234 -51.962
## + SWV:m_a2               1   0.84639 58.295 -51.846
## + m_a2:density           1   0.68383 58.458 -51.539
## + m_waist                1   0.66992 58.472 -51.513
## + weight                 1   0.55690 58.585 -51.301
## + m_led:m_a2             1   0.51149 58.630 -51.216
## + m_a2:hw.vfrac          1   0.37774 58.764 -50.965
## + m_volume               1   0.35970 58.782 -50.931
## + m_whorliness:hw.vfrac  1   0.26549 58.876 -50.755
## + SWV:density            1   0.22212 58.919 -50.674
## + m_led:hw.vfrac         1   0.20949 58.932 -50.650
## + m_led:m_whorliness     1   0.17610 58.965 -50.588
## + m_ovality              1   0.12766 59.014 -50.498
## + m_led:density          1   0.11891 59.023 -50.481
## + m_sed                  1   0.11643 59.025 -50.477
## + SWV:m_led              1   0.10014 59.041 -50.447
## + m_a0                   1   0.09159 59.050 -50.431
## + m_taper                1   0.08253 59.059 -50.414
## + m_a1                   1   0.07172 59.070 -50.394
## + SWV:hw.vfrac           1   0.05669 59.085 -50.366
## + m_a2:m_whorliness      1   0.03288 59.109 -50.321
## + m_sweep1               1   0.02174 59.120 -50.301
## + m_sweep2               1   0.01381 59.128 -50.286
## 
## Step:  AIC=-52.43
## E.avg.dyn ~ SWV + density + m_a2 + hw.vfrac + m_led + m_whorliness + 
##     density:hw.vfrac + SWV:m_whorliness
## 
##                         Df Sum of Sq    RSS     AIC
## + m_whorliness:density   1   1.49720 56.487 -53.312
## <none>                               57.984 -52.435
## + SWV:m_a2               1   0.89475 57.089 -52.145
## + m_whorliness:hw.vfrac  1   0.84032 57.143 -52.041
## + m_led:m_whorliness     1   0.77212 57.212 -51.909
## + m_a2:density           1   0.64721 57.337 -51.670
## + m_waist                1   0.62547 57.358 -51.628
## + m_led:m_a2             1   0.52423 57.460 -51.434
## + weight                 1   0.47763 57.506 -51.345
## + m_volume               1   0.30792 57.676 -51.021
## + m_a2:hw.vfrac          1   0.28443 57.699 -50.976
## + SWV:m_led              1   0.20816 57.776 -50.830
## + m_led:hw.vfrac         1   0.17852 57.805 -50.774
## + SWV:density            1   0.14938 57.834 -50.719
## + m_taper                1   0.12375 57.860 -50.670
## + m_led:density          1   0.10879 57.875 -50.641
## + m_a1                   1   0.10701 57.877 -50.638
## + m_sed                  1   0.09566 57.888 -50.616
## + m_a0                   1   0.06186 57.922 -50.552
## + m_sweep1               1   0.06015 57.924 -50.549
## + m_ovality              1   0.04156 57.942 -50.514
## + SWV:hw.vfrac           1   0.01105 57.973 -50.456
## + m_sweep2               1   0.00495 57.979 -50.444
## + m_a2:m_whorliness      1   0.00000 57.984 -50.435
## 
## Step:  AIC=-53.31
## E.avg.dyn ~ SWV + density + m_a2 + hw.vfrac + m_led + m_whorliness + 
##     density:hw.vfrac + SWV:m_whorliness + density:m_whorliness
## 
##                         Df Sum of Sq    RSS     AIC
## <none>                               56.487 -53.312
## + m_waist                1   0.86143 55.625 -53.003
## + m_led:m_whorliness     1   0.83548 55.651 -52.952
## + m_a2:density           1   0.74261 55.744 -52.768
## + m_led:m_a2             1   0.74104 55.746 -52.765
## + SWV:m_a2               1   0.73913 55.747 -52.761
## + weight                 1   0.68257 55.804 -52.650
## + m_volume               1   0.51930 55.967 -52.328
## + m_a2:hw.vfrac          1   0.38666 56.100 -52.068
## + SWV:m_led              1   0.33145 56.155 -51.960
## + m_led:hw.vfrac         1   0.13984 56.347 -51.585
## + m_a0                   1   0.12005 56.367 -51.546
## + m_sed                  1   0.09013 56.396 -51.488
## + m_ovality              1   0.07139 56.415 -51.452
## + m_sweep1               1   0.03801 56.449 -51.387
## + m_taper                1   0.03715 56.449 -51.385
## + m_a1                   1   0.02751 56.459 -51.366
## + m_a2:m_whorliness      1   0.02057 56.466 -51.353
## + m_led:density          1   0.01795 56.469 -51.347
## + SWV:hw.vfrac           1   0.01778 56.469 -51.347
## + m_whorliness:hw.vfrac  1   0.00806 56.479 -51.328
## + m_sweep2               1   0.00759 56.479 -51.327
## + SWV:density            1   0.00442 56.482 -51.321
## 
## Call:
## lm(formula = E.avg.dyn ~ SWV + density + m_a2 + hw.vfrac + m_led + 
##     m_whorliness + density:hw.vfrac + SWV:m_whorliness + density:m_whorliness, 
##     data = L, subset = !is.na(L$m_sed))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -3.2100 -0.4475  0.0329  0.5336  1.7058 
## 
## Coefficients:
##                        Estimate Std. Error t value Pr(>|t|)    
## (Intercept)          -22.666570   6.807015  -3.330  0.00122 ** 
## SWV                    0.006674   0.001090   6.123 1.82e-08 ***
## density                0.010810   0.005302   2.039  0.04410 *  
## m_a2                   0.006598   0.002792   2.363  0.02005 *  
## hw.vfrac             -13.093606   6.238219  -2.099  0.03834 *  
## m_led                  0.002497   0.001176   2.124  0.03613 *  
## m_whorliness          14.691219   7.154645   2.053  0.04265 *  
## density:hw.vfrac       0.011036   0.006869   1.607  0.11130    
## SWV:m_whorliness      -0.002043   0.001161  -1.759  0.08169 .  
## density:m_whorliness  -0.009240   0.005675  -1.628  0.10666    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.7516 on 100 degrees of freedom
## Multiple R-squared:  0.7651, Adjusted R-squared:  0.744 
## F-statistic: 36.19 on 9 and 100 DF,  p-value: < 2.2e-16
#
m.best.current <- step(lm(E.avg.dyn ~ SWV, L, subset=!is.na(L$m_sed)), direction="forward", scope=E.avg.dyn ~ (m_volume+volume+SWV))
## Start:  AIC=26.03
## E.avg.dyn ~ SWV
## 
##            Df Sum of Sq    RSS    AIC
## + m_volume  1    9.7385 124.65 19.751
## + volume    1    9.6358 124.75 19.842
## <none>                  134.39 26.026
## 
## Step:  AIC=19.75
## E.avg.dyn ~ SWV + m_volume
## 
##          Df Sum of Sq    RSS    AIC
## <none>                124.65 19.751
## + volume  1    0.2187 124.43 21.558
m.best.withWeight <- step(lm(E.avg.dyn ~ SWV, L, subset=!is.na(L$m_sed)), direction="forward", scope=E.avg.dyn ~ (m_volume+volume+SWV+weight+density+hw.vfrac))
## Start:  AIC=26.03
## E.avg.dyn ~ SWV
## 
##            Df Sum of Sq     RSS     AIC
## + density   1    60.264  74.123 -37.424
## + hw.vfrac  1    52.694  81.692 -26.728
## + weight    1    16.594 117.792  13.529
## + m_volume  1     9.739 124.648  19.751
## + volume    1     9.636 124.750  19.842
## <none>                  134.386  26.026
## 
## Step:  AIC=-37.42
## E.avg.dyn ~ SWV + density
## 
##            Df Sum of Sq    RSS     AIC
## + m_volume  1    3.6608 70.462 -40.995
## + volume    1    3.6094 70.513 -40.915
## + weight    1    3.6037 70.519 -40.906
## + hw.vfrac  1    2.9957 71.127 -39.962
## <none>                  74.123 -37.424
## 
## Step:  AIC=-41
## E.avg.dyn ~ SWV + density + m_volume
## 
##            Df Sum of Sq    RSS     AIC
## + hw.vfrac  1   2.91738 67.544 -43.646
## <none>                  70.462 -40.995
## + volume    1   0.14912 70.313 -39.228
## + weight    1   0.02702 70.435 -39.037
## 
## Step:  AIC=-43.65
## E.avg.dyn ~ SWV + density + m_volume + hw.vfrac
## 
##          Df Sum of Sq    RSS     AIC
## <none>                67.544 -43.646
## + volume  1   0.54801 66.996 -42.543
## + weight  1   0.23127 67.313 -42.024
# currently measurable: SWV, volume/size, shape
# with weight: SWV, volume/size, shape, weight, density
m.best.withWeight <- step(lm(E.avg.dyn ~ SWV, L, subset=!is.na(L$m_sed)), direction="forward", scope=E.avg.dyn ~ (m_volume+volume+SWV+weight+density+hw.vfrac))
## Start:  AIC=26.03
## E.avg.dyn ~ SWV
## 
##            Df Sum of Sq     RSS     AIC
## + density   1    60.264  74.123 -37.424
## + hw.vfrac  1    52.694  81.692 -26.728
## + weight    1    16.594 117.792  13.529
## + m_volume  1     9.739 124.648  19.751
## + volume    1     9.636 124.750  19.842
## <none>                  134.386  26.026
## 
## Step:  AIC=-37.42
## E.avg.dyn ~ SWV + density
## 
##            Df Sum of Sq    RSS     AIC
## + m_volume  1    3.6608 70.462 -40.995
## + volume    1    3.6094 70.513 -40.915
## + weight    1    3.6037 70.519 -40.906
## + hw.vfrac  1    2.9957 71.127 -39.962
## <none>                  74.123 -37.424
## 
## Step:  AIC=-41
## E.avg.dyn ~ SWV + density + m_volume
## 
##            Df Sum of Sq    RSS     AIC
## + hw.vfrac  1   2.91738 67.544 -43.646
## <none>                  70.462 -40.995
## + volume    1   0.14912 70.313 -39.228
## + weight    1   0.02702 70.435 -39.037
## 
## Step:  AIC=-43.65
## E.avg.dyn ~ SWV + density + m_volume + hw.vfrac
## 
##          Df Sum of Sq    RSS     AIC
## <none>                67.544 -43.646
## + volume  1   0.54801 66.996 -42.543
## + weight  1   0.23127 67.313 -42.024
m.best.withHW <- step(lm(E.avg.dyn ~ SWV, L, subset=!is.na(L$m_sed)), direction="forward", scope=E.avg.dyn ~ (m_volume+volume+SWV+hw.vfrac))
## Start:  AIC=26.03
## E.avg.dyn ~ SWV
## 
##            Df Sum of Sq     RSS     AIC
## + hw.vfrac  1    52.694  81.692 -26.728
## + m_volume  1     9.739 124.648  19.751
## + volume    1     9.636 124.750  19.842
## <none>                  134.386  26.026
## 
## Step:  AIC=-26.73
## E.avg.dyn ~ SWV + hw.vfrac
## 
##            Df Sum of Sq    RSS     AIC
## + m_volume  1    4.6896 77.002 -31.231
## + volume    1    4.5145 77.177 -30.981
## <none>                  81.692 -26.728
## 
## Step:  AIC=-31.23
## E.avg.dyn ~ SWV + hw.vfrac + m_volume
## 
##          Df Sum of Sq    RSS     AIC
## + volume  1    1.5404 75.462 -31.454
## <none>                77.002 -31.231
## 
## Step:  AIC=-31.45
## E.avg.dyn ~ SWV + hw.vfrac + m_volume + volume
# with heartwood: SWV, volume/size, shape, weight, density, hw.vfrac
m.best.withWeightHW <- step(lm(E.avg.dyn ~ (SWV + density + weight + hw.vfrac), L))
## Start:  AIC=-35.69
## E.avg.dyn ~ (SWV + density + weight + hw.vfrac)
## 
##            Df Sum of Sq     RSS     AIC
## <none>                   82.003 -35.688
## - weight    1     3.437  85.440 -32.761
## - hw.vfrac  1     5.222  87.225 -30.280
## - density   1     8.493  90.496 -25.862
## - SWV       1   170.287 252.291  97.171

Plot best models for Marco:

myplot=function (m, lbl) {
  print(s<-summary(m))
  xyplot(m$model$E.avg.dyn ~ predict(m), 
         panel=function(x,y,...) {
           panel.abline(c(0,1), col='grey70', lty=2)
           panel.xyplot(x,y,...)}, 
          aspect='iso',
         xlab='Predicted', ylab='Actual',
         main=sprintf('%s\nr^2=%0.2f',lbl,s$r.squared))
         #main=lbl, sub=expression(r^2==s$r.squared))
}
library(gridExtra)
grid.arrange(myplot(m.best.current, lbl="Current (SWV + volume)"), 
             myplot(m.best.withWeight, lbl="With Log Weight"), 
             myplot(m.best.withHW, lbl="With Log end HW"), 
             myplot(m.best, lbl="Everything"),
             nrow=1, 
             as.table=TRUE)
## 
## Call:
## lm(formula = E.avg.dyn ~ SWV + m_volume, data = L, subset = !is.na(L$m_sed))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -3.2365 -0.6130 -0.0252  0.6845  2.6291 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -6.1681972  1.5528785  -3.972 0.000129 ***
## SWV          0.0044086  0.0004421   9.971  < 2e-16 ***
## m_volume     1.8252705  0.6312929   2.891 0.004647 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.079 on 107 degrees of freedom
## Multiple R-squared:  0.4817, Adjusted R-squared:  0.472 
## F-statistic: 49.72 on 2 and 107 DF,  p-value: 5.386e-16
## 
## 
## Call:
## lm(formula = E.avg.dyn ~ SWV + density + m_volume + hw.vfrac, 
##     data = L, subset = !is.na(L$m_sed))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -3.8537 -0.3722  0.0763  0.4953  1.8764 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -1.466e+01  2.309e+00  -6.347 5.68e-09 ***
## SWV          5.170e-03  3.414e-04  15.146  < 2e-16 ***
## density      7.391e-03  1.927e-03   3.834 0.000215 ***
## m_volume     1.121e+00  4.752e-01   2.360 0.020128 *  
## hw.vfrac    -2.720e+00  1.277e+00  -2.130 0.035542 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.802 on 105 degrees of freedom
## Multiple R-squared:  0.7191, Adjusted R-squared:  0.7084 
## F-statistic: 67.21 on 4 and 105 DF,  p-value: < 2.2e-16
## 
## 
## Call:
## lm(formula = E.avg.dyn ~ SWV + hw.vfrac + m_volume + volume, 
##     data = L, subset = !is.na(L$m_sed))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -3.7326 -0.3921 -0.0176  0.4720  1.7951 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -6.709e+00  1.240e+00  -5.412 3.97e-07 ***
## SWV          5.127e-03  3.643e-04  14.073  < 2e-16 ***
## hw.vfrac    -6.761e+00  8.191e-01  -8.254 4.83e-13 ***
## m_volume     2.416e+01  1.564e+01   1.545    0.125    
## volume      -2.157e+01  1.474e+01  -1.464    0.146    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.8478 on 105 degrees of freedom
## Multiple R-squared:  0.6862, Adjusted R-squared:  0.6743 
## F-statistic:  57.4 on 4 and 105 DF,  p-value: < 2.2e-16
## 
## 
## Call:
## lm(formula = E.avg.dyn ~ SWV + density + m_a2 + hw.vfrac + m_led + 
##     m_whorliness, data = L, subset = !is.na(L$m_sed))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -3.6602 -0.4242  0.0010  0.4909  1.6757 
## 
## Coefficients:
##                Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  -1.284e+01  2.340e+00  -5.486 2.96e-07 ***
## SWV           4.923e-03  3.376e-04  14.583  < 2e-16 ***
## density       6.447e-03  1.890e-03   3.412 0.000924 ***
## m_a2          6.458e-03  2.759e-03   2.340 0.021205 *  
## hw.vfrac     -3.054e+00  1.275e+00  -2.394 0.018475 *  
## m_led         2.272e-03  1.172e-03   1.937 0.055445 .  
## m_whorliness -5.163e-01  2.709e-01  -1.906 0.059419 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.7673 on 103 degrees of freedom
## Multiple R-squared:  0.7478, Adjusted R-squared:  0.7331 
## F-statistic: 50.91 on 6 and 103 DF,  p-value: < 2.2e-16

Does eliminating logs with significant compression wood visible on ends lead to better models?

what % of lumber that is not from the cant has stiffness below 6GPa?

2.2 Warp

2.2.1 Best Linear Models

Use stepwise regression to select ‘best’ (in terms of AIC) linear model.

best.linear.model = function (y,LL=NULL,plot=TRUE,...) {
  if (is.null(LL)) {
    
    LL=L[,predictors]
  }
  LL$y = y
  LL = na.omit(LL)#[complete.cases(LL),]
  scope = formula(paste("y~",paste(predictors,collapse='+')))
  #print(scope)
  m.init <- lm(y ~ SWV, LL, ...)
  #browser()
  m <- step(m.init, direction="both", scope=scope, trace=0)
  if (plot) {
    print(xyplot(LL$y ~ predict(m),aspect='iso',
                 panel=function(...){
                    panel.abline(c(0,1),col='grey70')
                    panel.xyplot(...)},
                 main=deparse(substitute(y)),
                 xlab='predicted', ylab='observed'))
  }
  return(m)
}

2.2.1.1 Bow

summary(m.best.bow_avg <- best.linear.model(L$bow_avg))
## 
## Call:
## lm(formula = y ~ SWV + density + m_taper + m_whorliness, data = LL)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -8.3691 -2.2349 -0.4538  1.6654 16.0980 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  48.501185   7.972952   6.083 1.94e-08 ***
## SWV          -0.006148   0.001506  -4.083 8.70e-05 ***
## density      -0.014984   0.005031  -2.978   0.0036 ** 
## m_taper      -0.222586   0.131070  -1.698   0.0924 .  
## m_whorliness -2.041574   1.258311  -1.622   0.1077    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.451 on 105 degrees of freedom
## Multiple R-squared:  0.189,  Adjusted R-squared:  0.1581 
## F-statistic: 6.119 on 4 and 105 DF,  p-value: 0.0001824
summary(m.best.bow_p50 <- best.linear.model(L$bow_p50))
## 
## Call:
## lm(formula = y ~ SWV + m_whorliness + weight + m_sed, data = LL)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -7.8776 -2.2011 -0.2556  2.1400 10.5632 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  23.179203   5.754269   4.028 0.000107 ***
## SWV          -0.006767   0.001578  -4.287 4.03e-05 ***
## m_whorliness -3.944875   1.202708  -3.280 0.001409 ** 
## weight       -0.038237   0.009623  -3.974 0.000130 ***
## m_sed         0.087509   0.025646   3.412 0.000916 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.541 on 105 degrees of freedom
## Multiple R-squared:  0.245,  Adjusted R-squared:  0.2162 
## F-statistic: 8.518 on 4 and 105 DF,  p-value: 5.422e-06
summary(m.best.bow_p75 <- best.linear.model(L$bow_p75))
## 
## Call:
## lm(formula = y ~ SWV + m_taper + density, data = LL)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -11.0984  -3.3291  -0.6175   3.0863  20.7276 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept) 59.433708  11.481376   5.177 1.08e-06 ***
## SWV         -0.007701   0.002218  -3.472 0.000748 ***
## m_taper     -0.548397   0.179534  -3.055 0.002851 ** 
## density     -0.016005   0.007296  -2.194 0.030449 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 5.089 on 106 degrees of freedom
## Multiple R-squared:  0.1527, Adjusted R-squared:  0.1288 
## F-statistic: 6.369 on 3 and 106 DF,  p-value: 0.0005193

SWV, weight, density, whorliness and taper best predictors. Median bow best predicted.

2.2.1.2 Crook

summary(m.best.crook_avg <- best.linear.model(L$crook_avg))
## 
## Call:
## lm(formula = y ~ density + sweep.prod + m_waist, data = LL)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -3.3170 -1.4776 -0.2643  1.0128 10.4716 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept) 11.653904   2.953953   3.945 0.000144 ***
## density     -0.007949   0.003093  -2.570 0.011562 *  
## sweep.prod   2.111823   0.877651   2.406 0.017849 *  
## m_waist     -1.155524   0.645883  -1.789 0.076461 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2.198 on 106 degrees of freedom
## Multiple R-squared:  0.1473, Adjusted R-squared:  0.1232 
## F-statistic: 6.105 on 3 and 106 DF,  p-value: 0.0007164
summary(m.best.crook_p50 <- best.linear.model(L$crook_p50))
## 
## Call:
## lm(formula = y ~ SWV + density + sweep.prod + m_taper, data = LL)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -4.2772 -1.3010 -0.3075  0.9454  8.3582 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept) 17.8230517  4.7148280   3.780 0.000261 ***
## SWV         -0.0015231  0.0008867  -1.718 0.088776 .  
## density     -0.0090893  0.0029451  -3.086 0.002592 ** 
## sweep.prod   1.9155031  0.8246375   2.323 0.022116 *  
## m_taper     -0.1087701  0.0709175  -1.534 0.128098    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.999 on 105 degrees of freedom
## Multiple R-squared:  0.1763, Adjusted R-squared:  0.1449 
## F-statistic: 5.617 on 4 and 105 DF,  p-value: 0.0003891
summary(m.best.crook_p75 <- best.linear.model(L$crook_p75))
## 
## Call:
## lm(formula = y ~ SWV + density + sweep.prod + m_taper, data = LL)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -4.0136 -1.8490 -0.7262  1.1790 14.3093 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept) 28.164952   6.939429   4.059 9.52e-05 ***
## SWV         -0.002288   0.001305  -1.753 0.082520 .  
## density     -0.014720   0.004335  -3.396 0.000967 ***
## sweep.prod   2.879757   1.213727   2.373 0.019481 *  
## m_taper     -0.150029   0.104379  -1.437 0.153590    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2.942 on 105 degrees of freedom
## Multiple R-squared:  0.1925, Adjusted R-squared:  0.1618 
## F-statistic: 6.258 on 4 and 105 DF,  p-value: 0.0001479

75%ile crook best predicted. Density, sweep.prod, SWV, whorliness.

2.2.1.3 Combination Warp

Stan combined bow and crook using WPA grade limits.

combined_warp = L$crook_avg/75 + L$bow_avg/25
summary(m.best.combined_warp <- best.linear.model(combined_warp))
## 
## Call:
## lm(formula = y ~ SWV + density + m_taper + m_whorliness, data = LL)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.33366 -0.09632 -0.01685  0.06353  0.72041 
## 
## Coefficients:
##                Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   2.242e+00  3.370e-01   6.654 1.33e-09 ***
## SWV          -2.745e-04  6.364e-05  -4.313 3.65e-05 ***
## density      -7.438e-04  2.126e-04  -3.498 0.000689 ***
## m_taper      -9.980e-03  5.540e-03  -1.802 0.074491 .  
## m_whorliness -8.014e-02  5.319e-02  -1.507 0.134860    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.1459 on 105 degrees of freedom
## Multiple R-squared:  0.2133, Adjusted R-squared:  0.1833 
## F-statistic: 7.116 on 4 and 105 DF,  p-value: 4.14e-05

What happens if we toss a couple of outliers?

L$SWILogNumber[combined_warp>1.2] # 222
## [1] 222
L$SWILogNumber[combined_warp<0.2] # 103
## [1] 103
subset = !L$SWILogNumber%in%c(103,222)
summary(m.best.combined_warp <- best.linear.model(combined_warp[subset], LL=L[subset,predictors]))
## 
## Call:
## lm(formula = y ~ SWV + m_taper + density, data = LL)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.23232 -0.07982 -0.00473  0.06620  0.36157 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  1.943e+00  2.825e-01   6.877 4.69e-10 ***
## SWV         -2.425e-04  5.468e-05  -4.435 2.29e-05 ***
## m_taper     -1.532e-02  4.407e-03  -3.476 0.000743 ***
## density     -5.608e-04  1.800e-04  -3.115 0.002377 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.1245 on 104 degrees of freedom
## Multiple R-squared:  0.2276, Adjusted R-squared:  0.2053 
## F-statistic: 10.22 on 3 and 104 DF,  p-value: 5.923e-06

A little better, but nothing spectacular.

Can a random forest model do better?

library(randomForest)
## randomForest 4.6-10
## Type rfNews() to see new features/changes/bug fixes.
LL=L[,predictors]
LL$combined_warp = combined_warp
LL = na.omit(LL)
m.rf <- randomForest(combined_warp ~ ., LL, importance=TRUE, ntree=50000)
par(mfcol=c(1,1))
varImpPlot(m.rf)
print(m.rf)
## 
## Call:
##  randomForest(formula = combined_warp ~ ., data = LL, importance = TRUE,      ntree = 50000) 
##                Type of random forest: regression
##                      Number of trees: 50000
## No. of variables tried at each split: 5
## 
##           Mean of squared residuals: 0.02542085
##                     % Var explained: 1.55
xyplot(LL$combined_warp ~ predict(m.rf), aspect='iso')

Lousy results, but interesting that log green density turns up as the most favoured predictor, followed by SWV, taper and ovality.

What about other variable selection approaches?

library(subselect)
LL <- L[,predictors]
for (lmeas in c('E.avg.dyn','crook_avg','crook_avg_inner','crook_avg_outer','bow_avg','twist_avg')) {
  LL$y = L[,lmeas]
  m.0 <- lm(y ~ ., LL)
  Hmat <- lmHmat(m.0)
  Eleaps <- eleaps(Hmat$mat, kmin=1, kmax=length(predictors)-1, H=Hmat$H, r=Hmat$r)
  plot(Eleaps$bestvalues, type='b', main=lmeas, ylab="model goodness", xlab="number of predictors")
  cat(paste("\n",lmeas,"\n"))
  for (i in 1:nrow(Eleaps$bestsets)) {
    cat(paste(i,': ',paste(colnames(Hmat$mat)[Eleaps$bestsets[i,1:i]],collapse=", "),"\n", sep=""))
    # AIC?
  }
}
## 
##  E.avg.dyn 
## 1: SWV
## 2: SWV, density
## 3: SWV, m_a2, density
## 4: SWV, m_a2, density, hw.vfrac
## 5: SWV, m_led, m_a1, density, hw.vfrac
## 6: SWV, m_led, m_a2, m_whorliness, density, hw.vfrac
## 7: SWV, m_led, m_a1, m_whorliness, weight, density, hw.vfrac
## 8: SWV, m_led, m_a0, m_a1, m_waist, m_whorliness, density, hw.vfrac
## 9: SWV, m_led, m_a0, m_a2, m_taper, m_waist, m_whorliness, density, hw.vfrac
## 10: SWV, m_led, m_a0, m_a2, m_taper, m_waist, m_ovality, m_whorliness, density, hw.vfrac
## 11: SWV, m_led, m_a0, m_a2, m_taper, m_waist, m_ovality, m_whorliness, weight, density, hw.vfrac
## 12: SWV, m_volume, m_led, m_a0, m_a2, m_taper, m_waist, m_ovality, m_whorliness, weight, density, hw.vfrac
## 13: SWV, m_volume, m_led, m_sed, m_a0, m_a2, m_taper, m_waist, m_ovality, m_whorliness, weight, density, hw.vfrac
## 14: SWV, m_volume, m_led, m_sed, m_a0, m_a2, m_taper, m_waist, m_ovality, m_whorliness, m_sweep1, weight, density, hw.vfrac
## 15: SWV, m_volume, m_led, m_sed, m_a0, m_a2, m_taper, m_waist, m_ovality, m_whorliness, m_sweep2, weight, density, hw.vfrac, sweep.prod
## 16: SWV, m_volume, m_led, m_sed, m_a0, m_a2, m_taper, m_waist, m_ovality, m_whorliness, m_sweep1, m_sweep2, weight, density, hw.vfrac, sweep.prod
## 
##  crook_avg 
## 1: density
## 2: density, sweep.prod
## 3: m_waist, density, sweep.prod
## 4: m_a2, m_waist, density, sweep.prod
## 5: m_a1, m_taper, m_waist, density, sweep.prod
## 6: SWV, m_a1, m_taper, m_waist, density, sweep.prod
## 7: m_volume, m_a1, m_taper, m_waist, weight, density, sweep.prod
## 8: SWV, m_volume, m_a1, m_taper, m_waist, weight, density, sweep.prod
## 9: SWV, m_volume, m_sed, m_a1, m_taper, m_waist, weight, density, sweep.prod
## 10: SWV, m_volume, m_sed, m_a1, m_taper, m_waist, m_ovality, weight, density, sweep.prod
## 11: SWV, m_volume, m_sed, m_a1, m_taper, m_waist, m_ovality, weight, density, hw.vfrac, sweep.prod
## 12: SWV, m_volume, m_sed, m_a1, m_taper, m_waist, m_ovality, m_whorliness, weight, density, hw.vfrac, sweep.prod
## 13: SWV, m_volume, m_sed, m_a1, m_a2, m_taper, m_waist, m_ovality, m_whorliness, weight, density, hw.vfrac, sweep.prod
## 14: SWV, m_volume, m_led, m_sed, m_a0, m_a1, m_taper, m_waist, m_ovality, m_whorliness, weight, density, hw.vfrac, sweep.prod
## 15: SWV, m_volume, m_led, m_sed, m_a0, m_a1, m_a2, m_taper, m_waist, m_ovality, m_whorliness, weight, density, hw.vfrac, sweep.prod
## 16: SWV, m_volume, m_led, m_sed, m_a0, m_a1, m_a2, m_taper, m_waist, m_ovality, m_whorliness, m_sweep2, weight, density, hw.vfrac, sweep.prod
## 
##  crook_avg_inner 
## 1: density
## 2: m_volume, density
## 3: m_led, m_waist, density
## 4: SWV, m_sed, m_waist, density
## 5: SWV, m_sed, m_a2, m_waist, density
## 6: m_sed, m_a1, m_taper, m_waist, density, sweep.prod
## 7: SWV, m_sed, m_a1, m_taper, m_waist, density, sweep.prod
## 8: SWV, m_sed, m_a1, m_taper, m_waist, m_ovality, density, sweep.prod
## 9: SWV, m_sed, m_a1, m_taper, m_waist, m_ovality, weight, density, sweep.prod
## 10: SWV, m_sed, m_a1, m_taper, m_waist, m_ovality, weight, density, hw.vfrac, sweep.prod
## 11: SWV, m_volume, m_sed, m_a1, m_taper, m_waist, m_ovality, weight, density, hw.vfrac, sweep.prod
## 12: SWV, m_volume, m_sed, m_a1, m_taper, m_waist, m_ovality, m_whorliness, weight, density, hw.vfrac, sweep.prod
## 13: SWV, m_volume, m_sed, m_a1, m_a2, m_taper, m_waist, m_ovality, m_whorliness, weight, density, hw.vfrac, sweep.prod
## 14: SWV, m_volume, m_sed, m_a1, m_taper, m_waist, m_ovality, m_whorliness, m_sweep1, m_sweep2, weight, density, hw.vfrac, sweep.prod
## 15: SWV, m_volume, m_sed, m_a1, m_a2, m_taper, m_waist, m_ovality, m_whorliness, m_sweep1, m_sweep2, weight, density, hw.vfrac, sweep.prod
## 16: SWV, m_volume, m_sed, m_a0, m_a1, m_a2, m_taper, m_waist, m_ovality, m_whorliness, m_sweep1, m_sweep2, weight, density, hw.vfrac, sweep.prod
## 
##  crook_avg_outer 
## 1: SWV
## 2: SWV, m_waist
## 3: SWV, m_a2, m_waist
## 4: SWV, m_a1, m_taper, m_waist
## 5: SWV, m_a1, m_taper, m_waist, m_sweep1
## 6: SWV, m_a1, m_taper, m_waist, m_sweep1, hw.vfrac
## 7: SWV, m_a1, m_taper, m_waist, m_sweep2, hw.vfrac, sweep.prod
## 8: SWV, m_a1, m_taper, m_waist, m_sweep2, weight, hw.vfrac, sweep.prod
## 9: SWV, m_sed, m_a0, m_a1, m_taper, m_waist, m_sweep2, hw.vfrac, sweep.prod
## 10: SWV, m_sed, m_a0, m_a1, m_taper, m_waist, m_ovality, m_sweep2, hw.vfrac, sweep.prod
## 11: SWV, m_sed, m_a0, m_a1, m_taper, m_waist, m_ovality, m_sweep1, m_sweep2, hw.vfrac, sweep.prod
## 12: SWV, m_sed, m_a0, m_a1, m_taper, m_waist, m_ovality, m_sweep1, m_sweep2, weight, hw.vfrac, sweep.prod
## 13: SWV, m_volume, m_sed, m_a0, m_a1, m_a2, m_taper, m_waist, m_ovality, m_sweep1, m_sweep2, hw.vfrac, sweep.prod
## 14: SWV, m_volume, m_led, m_sed, m_a0, m_a1, m_a2, m_taper, m_waist, m_ovality, m_sweep1, m_sweep2, hw.vfrac, sweep.prod
## 15: SWV, m_led, m_sed, m_a0, m_a1, m_a2, m_taper, m_waist, m_ovality, m_sweep1, m_sweep2, weight, density, hw.vfrac, sweep.prod
## 16: SWV, m_led, m_sed, m_a0, m_a1, m_a2, m_taper, m_waist, m_ovality, m_whorliness, m_sweep1, m_sweep2, weight, density, hw.vfrac, sweep.prod
## 
##  bow_avg 
## 1: SWV
## 2: SWV, density
## 3: SWV, m_taper, density
## 4: SWV, m_taper, m_whorliness, density
## 5: SWV, m_taper, m_ovality, m_whorliness, density
## 6: SWV, m_volume, m_a0, m_waist, m_whorliness, density
## 7: SWV, m_volume, m_sed, m_a0, m_waist, m_whorliness, density
## 8: SWV, m_volume, m_sed, m_a0, m_waist, m_ovality, m_whorliness, density
## 9: SWV, m_volume, m_sed, m_a0, m_a2, m_waist, m_ovality, m_whorliness, density
## 10: SWV, m_volume, m_sed, m_a0, m_a1, m_taper, m_waist, m_ovality, m_whorliness, density
## 11: SWV, m_volume, m_sed, m_a0, m_a1, m_taper, m_waist, m_ovality, m_whorliness, density, sweep.prod
## 12: SWV, m_volume, m_sed, m_a0, m_a1, m_taper, m_waist, m_ovality, m_whorliness, weight, density, sweep.prod
## 13: SWV, m_volume, m_sed, m_a0, m_a1, m_a2, m_taper, m_waist, m_ovality, m_whorliness, weight, density, sweep.prod
## 14: SWV, m_sed, m_a0, m_a1, m_a2, m_taper, m_waist, m_ovality, m_whorliness, m_sweep1, m_sweep2, weight, density, sweep.prod
## 15: SWV, m_volume, m_sed, m_a0, m_a1, m_a2, m_taper, m_waist, m_ovality, m_whorliness, m_sweep1, m_sweep2, weight, density, sweep.prod
## 16: SWV, m_volume, m_sed, m_a0, m_a1, m_a2, m_taper, m_waist, m_ovality, m_whorliness, m_sweep1, m_sweep2, weight, density, hw.vfrac, sweep.prod
## 
##  twist_avg 
## 1: SWV
## 2: SWV, m_led
## 3: SWV, m_led, density
## 4: SWV, m_led, m_sed, density
## 5: SWV, m_led, m_sed, m_taper, density
## 6: SWV, m_led, m_sed, m_taper, m_ovality, density
## 7: SWV, m_led, m_sed, m_taper, m_ovality, m_sweep1, density
## 8: SWV, m_volume, m_led, m_a0, m_a1, m_waist, m_ovality, density
## 9: SWV, m_volume, m_led, m_a0, m_a1, m_waist, m_ovality, m_sweep1, density
## 10: SWV, m_volume, m_led, m_sed, m_a0, m_a1, m_waist, m_ovality, m_sweep1, density
## 11: SWV, m_volume, m_led, m_sed, m_a0, m_a1, m_waist, m_ovality, m_sweep1, density, hw.vfrac
## 12: SWV, m_volume, m_led, m_sed, m_a0, m_a1, m_waist, m_ovality, m_sweep1, m_sweep2, density, sweep.prod
## 13: SWV, m_volume, m_led, m_sed, m_a0, m_a1, m_waist, m_ovality, m_whorliness, m_sweep1, m_sweep2, density, sweep.prod
## 14: SWV, m_volume, m_led, m_sed, m_a0, m_a2, m_taper, m_waist, m_ovality, m_whorliness, m_sweep1, m_sweep2, density, sweep.prod
## 15: SWV, m_volume, m_led, m_sed, m_a0, m_a2, m_taper, m_waist, m_ovality, m_whorliness, m_sweep1, m_sweep2, density, hw.vfrac, sweep.prod
## 16: SWV, m_volume, m_led, m_sed, m_a0, m_a2, m_taper, m_waist, m_ovality, m_whorliness, m_sweep1, m_sweep2, weight, density, hw.vfrac, sweep.prod

Note: other R packages include bestglm, subselect, leaps, glmulti.

library(glmulti)
## Loading required package: rJava
library(leaps)
## 
## Attaching package: 'leaps'
## 
## The following object is masked from 'package:subselect':
## 
##     leaps
LL <- L[,predictors]
LL$y = L$E.avg.dyn
m.0 <- glm(y ~ ., LL, family=gaussian(link="identity")) # equiv to a linear model
m.best <- glmulti(m.0, method="l", level=1) # level=1 forces no interactions
## Initialization...
## TASK: Exhaustive screening of candidate set, branch-and-bound algorithm.
## [ Be sure to have package leaps installed ]
## Fitting...
## Completed.
## 225 first best models identified.
# sloooooooow!

From ML, May 8:

To do: * Any further models needed for warp? Why are models significantly poorer than KPP – due to compression wood outliers being removed in the KPP analysis? * Is a stiffness segregation device required on the edger? i.e. what % of lumber that is not from the cant has stiffness below 6GPa? If this is a major lets drop it. * Do we need to say anything about the mc data (NMI and aquascan)? A comment on importance of mc in warp expression and the variability we saw would be useful. * Any further implications for JNL trial?

2.3 Inner and Outer Models

2.3.1 MoE

grid.arrange(
  xyplot(E.gradient ~ E.d.hitman_avg, L),
  xyplot(E.gradient ~ volume, L),
ncol=2)

Reasonable range in inner:outer stiffness. Independent of overall stiffness and size.

See models below.

2.3.2 Crook

  summary(m <- best.linear.model(L$crook_avg))
## 
## Call:
## lm(formula = y ~ density + sweep.prod + m_waist, data = LL)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -3.3170 -1.4776 -0.2643  1.0128 10.4716 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept) 11.653904   2.953953   3.945 0.000144 ***
## density     -0.007949   0.003093  -2.570 0.011562 *  
## sweep.prod   2.111823   0.877651   2.406 0.017849 *  
## m_waist     -1.155524   0.645883  -1.789 0.076461 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2.198 on 106 degrees of freedom
## Multiple R-squared:  0.1473, Adjusted R-squared:  0.1232 
## F-statistic: 6.105 on 3 and 106 DF,  p-value: 0.0007164
  summary(m <- best.linear.model(L$crook_avg_inner))
## 
## Call:
## lm(formula = y ~ density + m_sed + m_waist, data = LL)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -6.288 -2.223 -0.860  1.490 13.596 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)   
## (Intercept) 14.008413   4.365237   3.209  0.00176 **
## density     -0.013907   0.004708  -2.954  0.00386 **
## m_sed        0.015127   0.005089   2.973  0.00366 **
## m_waist     -2.070118   1.013245  -2.043  0.04353 * 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.328 on 106 degrees of freedom
## Multiple R-squared:  0.1365, Adjusted R-squared:  0.112 
## F-statistic: 5.585 on 3 and 106 DF,  p-value: 0.001352
  summary(m <- best.linear.model(L$crook_avg_outer))
## 
## Call:
## lm(formula = y ~ SWV + m_waist + m_a2, data = LL)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -4.452 -1.613 -0.563  1.139 10.283 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)   
## (Intercept)  12.452262   3.664267   3.398   0.0010 **
## SWV          -0.002389   0.001109  -2.154   0.0339 * 
## m_waist     -49.942189  32.476941  -1.538   0.1275   
## m_a2          0.530931   0.354792   1.496   0.1380   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2.536 on 92 degrees of freedom
## Multiple R-squared:  0.1016, Adjusted R-squared:  0.07232 
## F-statistic: 3.469 on 3 and 92 DF,  p-value: 0.01934

Best inner and outer models are both WORSE than total!

2.3.3 Bow

  summary(m <- best.linear.model(L$bow_avg))
## 
## Call:
## lm(formula = y ~ SWV + density + m_taper + m_whorliness, data = LL)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -8.3691 -2.2349 -0.4538  1.6654 16.0980 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  48.501185   7.972952   6.083 1.94e-08 ***
## SWV          -0.006148   0.001506  -4.083 8.70e-05 ***
## density      -0.014984   0.005031  -2.978   0.0036 ** 
## m_taper      -0.222586   0.131070  -1.698   0.0924 .  
## m_whorliness -2.041574   1.258311  -1.622   0.1077    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.451 on 105 degrees of freedom
## Multiple R-squared:  0.189,  Adjusted R-squared:  0.1581 
## F-statistic: 6.119 on 4 and 105 DF,  p-value: 0.0001824
  summary(m <- best.linear.model(L$bow_avg_inner))
## 
## Call:
## lm(formula = y ~ SWV + m_ovality + density + m_a1, data = LL)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -8.8071 -3.4889 -0.9923  2.6980 17.9881 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  5.163e+01  1.133e+01   4.559  1.4e-05 ***
## SWV         -7.409e-03  2.182e-03  -3.395  0.00097 ***
## m_ovality    1.994e+03  7.068e+02   2.821  0.00573 ** 
## density     -1.666e-02  7.329e-03  -2.273  0.02507 *  
## m_a1        -3.115e-02  1.721e-02  -1.810  0.07311 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 5.11 on 105 degrees of freedom
## Multiple R-squared:  0.1666, Adjusted R-squared:  0.1349 
## F-statistic: 5.249 on 4 and 105 DF,  p-value: 0.0006807
  summary(m <- best.linear.model(L$bow_avg_outer))
## 
## Call:
## lm(formula = y ~ SWV + density + m_taper, data = LL)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -9.8770 -2.9641 -0.8829  2.2955 29.8845 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept) 76.793153  14.951333   5.136 1.56e-06 ***
## SWV         -0.011094   0.002821  -3.933 0.000163 ***
## density     -0.027576   0.009940  -2.774 0.006698 ** 
## m_taper     -0.484845   0.215945  -2.245 0.027149 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 6.003 on 92 degrees of freedom
## Multiple R-squared:  0.1883, Adjusted R-squared:  0.1618 
## F-statistic: 7.112 on 3 and 92 DF,  p-value: 0.000238

2.3.4 Outer c.f. Inner

Do logs with lousy inner boards also have lousy outer boards?

xyplot(crook_avg_outer ~ crook_avg_inner, L)
xyplot(bow_avg_outer ~ bow_avg_inner, L)
xyplot(twist_avg_outer ~ twist_avg_inner, L)

No. Outer and Inner pretty much uncorrelated.

2.4 Reduced Datasets

If we look only at subsets of logs that are in some way ‘good’, do we get similar prediction models?

2.4.1 Marco’s CW-free logs

Fit models only to logs Marco identified as not appearing to contain significant CW based on log end imagery.

both.ends.severe.cw = c(189, 210, 212, 222)
both.ends.moderate.cw = c(123, 135, 144, 159, 178, 188, 190, 208)
for (lmeas in log.quality.measures) {
  models <- cf.full(lmeas, idx.sub=!L$SWILogNumber%in%union(both.ends.severe.cw,both.ends.moderate.cw)) 
}

Call:
lm(formula = y ~ SWV + density + m_a2 + hw.vfrac + m_led + m_whorliness, 
    data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-3.6602 -0.4242  0.0010  0.4909  1.6757 

Coefficients:
               Estimate Std. Error t value Pr(>|t|)    
(Intercept)  -1.284e+01  2.340e+00  -5.486 2.96e-07 ***
SWV           4.923e-03  3.376e-04  14.583  < 2e-16 ***
density       6.447e-03  1.890e-03   3.412 0.000924 ***
m_a2          6.458e-03  2.759e-03   2.340 0.021205 *  
hw.vfrac     -3.054e+00  1.275e+00  -2.394 0.018475 *  
m_led         2.272e-03  1.172e-03   1.937 0.055445 .  
m_whorliness -5.163e-01  2.709e-01  -1.906 0.059419 .  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.7673 on 103 degrees of freedom
Multiple R-squared:  0.7478,    Adjusted R-squared:  0.7331 
F-statistic: 50.91 on 6 and 103 DF,  p-value: < 2.2e-16

Call:
lm(formula = y ~ SWV + density + m_a2 + hw.vfrac + m_volume + 
    m_whorliness, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-3.4238 -0.3736  0.0428  0.4779  1.5865 

Coefficients:
               Estimate Std. Error t value Pr(>|t|)    
(Intercept)  -1.188e+01  2.325e+00  -5.110 1.74e-06 ***
SWV           4.609e-03  3.504e-04  13.153  < 2e-16 ***
density       6.731e-03  1.890e-03   3.561 0.000587 ***
m_a2          7.243e-03  2.691e-03   2.691 0.008456 ** 
hw.vfrac     -2.465e+00  1.297e+00  -1.901 0.060439 .  
m_volume      8.792e-01  4.928e-01   1.784 0.077692 .  
m_whorliness -4.505e-01  2.785e-01  -1.617 0.109204    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.7585 on 92 degrees of freedom
Multiple R-squared:  0.7335,    Adjusted R-squared:  0.7161 
F-statistic:  42.2 on 6 and 92 DF,  p-value: < 2.2e-16

Call:
lm(formula = y ~ SWV + density + m_a2 + hw.vfrac + m_led + m_whorliness, 
    data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-3.6602 -0.4242  0.0010  0.4909  1.6757 

Coefficients:
               Estimate Std. Error t value Pr(>|t|)    
(Intercept)  -1.284e+01  2.340e+00  -5.486 2.96e-07 ***
SWV           4.923e-03  3.376e-04  14.583  < 2e-16 ***
density       6.447e-03  1.890e-03   3.412 0.000924 ***
m_a2          6.458e-03  2.759e-03   2.340 0.021205 *  
hw.vfrac     -3.054e+00  1.275e+00  -2.394 0.018475 *  
m_led         2.272e-03  1.172e-03   1.937 0.055445 .  
m_whorliness -5.163e-01  2.709e-01  -1.906 0.059419 .  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.7673 on 103 degrees of freedom
Multiple R-squared:  0.7478,    Adjusted R-squared:  0.7331 
F-statistic: 50.91 on 6 and 103 DF,  p-value: < 2.2e-16

Call:
lm(formula = y ~ SWV + density + m_a2 + hw.vfrac + m_volume + 
    m_whorliness, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-3.4238 -0.3736  0.0428  0.4779  1.5865 

Coefficients:
               Estimate Std. Error t value Pr(>|t|)    
(Intercept)  -1.188e+01  2.325e+00  -5.110 1.74e-06 ***
SWV           4.609e-03  3.504e-04  13.153  < 2e-16 ***
density       6.731e-03  1.890e-03   3.561 0.000587 ***
m_a2          7.243e-03  2.691e-03   2.691 0.008456 ** 
hw.vfrac     -2.465e+00  1.297e+00  -1.901 0.060439 .  
m_volume      8.792e-01  4.928e-01   1.784 0.077692 .  
m_whorliness -4.505e-01  2.785e-01  -1.617 0.109204    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.7585 on 92 degrees of freedom
Multiple R-squared:  0.7335,    Adjusted R-squared:  0.7161 
F-statistic:  42.2 on 6 and 92 DF,  p-value: < 2.2e-16

Call:
lm(formula = y ~ SWV + density + m_a0 + m_whorliness, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-3.0939 -0.5006 -0.1318  0.6620  3.3537 

Coefficients:
               Estimate Std. Error t value Pr(>|t|)    
(Intercept)  -1.054e+01  2.430e+00  -4.337 3.33e-05 ***
SWV           3.440e-03  4.456e-04   7.720 7.14e-12 ***
density       1.073e-02  1.558e-03   6.883 4.40e-10 ***
m_a0         -5.882e-03  1.595e-03  -3.687 0.000361 ***
m_whorliness -1.020e+00  3.621e-01  -2.816 0.005802 ** 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.063 on 105 degrees of freedom
Multiple R-squared:  0.5553,    Adjusted R-squared:  0.5383 
F-statistic: 32.77 on 4 and 105 DF,  p-value: < 2.2e-16

Call:
lm(formula = y ~ SWV + density + m_a0 + m_whorliness, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-2.9370 -0.4571 -0.0470  0.5565  3.3829 

Coefficients:
               Estimate Std. Error t value Pr(>|t|)    
(Intercept)  -9.3682146  2.5937496  -3.612 0.000490 ***
SWV           0.0032613  0.0004737   6.885 6.43e-10 ***
density       0.0100358  0.0016349   6.138 1.97e-08 ***
m_a0         -0.0062816  0.0016654  -3.772 0.000283 ***
m_whorliness -0.8949541  0.3869892  -2.313 0.022926 *  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.078 on 94 degrees of freedom
Multiple R-squared:  0.5307,    Adjusted R-squared:  0.5107 
F-statistic: 26.57 on 4 and 94 DF,  p-value: 9.378e-15

Call:
lm(formula = y ~ SWV + density + m_a1 + m_sweep1 + m_ovality + 
    hw.vfrac, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-5.4250 -0.5269 -0.1105  0.5919  3.6464 

Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
(Intercept) -1.370e+01  4.111e+00  -3.333  0.00126 ** 
SWV          6.240e-03  5.916e-04  10.547  < 2e-16 ***
density      5.777e-03  3.388e-03   1.705  0.09174 .  
m_a1        -1.448e-02  4.471e-03  -3.238  0.00171 ** 
m_sweep1    -4.274e-01  2.128e-01  -2.009  0.04768 *  
m_ovality    3.299e+02  1.791e+02   1.842  0.06886 .  
hw.vfrac    -3.839e+00  2.220e+00  -1.729  0.08728 .  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.248 on 87 degrees of freedom
Multiple R-squared:  0.656, Adjusted R-squared:  0.6322 
F-statistic: 27.65 on 6 and 87 DF,  p-value: < 2.2e-16

Call:
lm(formula = y ~ SWV + density + m_a1 + m_sweep1 + m_ovality, 
    data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-4.9979 -0.6017 -0.0822  0.7391  2.8019 

Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
(Intercept) -1.555e+01  3.333e+00  -4.666 1.27e-05 ***
SWV          5.580e-03  6.059e-04   9.209 4.76e-14 ***
density      9.160e-03  2.191e-03   4.182 7.59e-05 ***
m_a1        -1.308e-02  4.471e-03  -2.925  0.00453 ** 
m_sweep1    -5.275e-01  2.266e-01  -2.327  0.02257 *  
m_ovality    3.247e+02  1.889e+02   1.718  0.08976 .  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.23 on 77 degrees of freedom
Multiple R-squared:  0.6308,    Adjusted R-squared:  0.6068 
F-statistic: 26.31 on 5 and 77 DF,  p-value: 2.116e-15

Call:
lm(formula = y ~ SWV + m_a0 + m_sweep1 + m_ovality + m_a1 + m_whorliness + 
    m_waist, data = LL)

Residuals:
     Min       1Q   Median       3Q      Max 
-0.25566 -0.09036 -0.00736  0.06609  0.39768 

Coefficients:
               Estimate Std. Error t value Pr(>|t|)    
(Intercept)   1.308e+00  2.633e-01   4.966 3.43e-06 ***
SWV          -1.163e-04  6.520e-05  -1.784  0.07796 .  
m_a0         -6.415e-04  2.398e-04  -2.675  0.00895 ** 
m_sweep1      5.468e-02  2.293e-02   2.385  0.01929 *  
m_ovality    -4.362e+01  1.936e+01  -2.253  0.02678 *  
m_a1          2.888e-03  1.188e-03   2.431  0.01715 *  
m_whorliness -1.182e-01  5.225e-02  -2.263  0.02617 *  
m_waist       1.531e-01  1.053e-01   1.454  0.14958    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.1338 on 86 degrees of freedom
Multiple R-squared:  0.2895,    Adjusted R-squared:  0.2317 
F-statistic: 5.007 on 7 and 86 DF,  p-value: 8.649e-05

Call:
lm(formula = y ~ SWV + m_a0 + m_sweep1 + m_ovality + m_a1 + m_whorliness, 
    data = LL)

Residuals:
     Min       1Q   Median       3Q      Max 
-0.25844 -0.07241 -0.02548  0.05884  0.42564 

Coefficients:
               Estimate Std. Error t value Pr(>|t|)    
(Intercept)   1.357e+00  2.758e-01   4.918 4.93e-06 ***
SWV          -1.269e-04  6.898e-05  -1.840   0.0696 .  
m_a0         -5.933e-04  2.513e-04  -2.361   0.0208 *  
m_sweep1      6.281e-02  2.618e-02   2.399   0.0189 *  
m_ovality    -4.587e+01  2.163e+01  -2.120   0.0372 *  
m_a1          1.182e-03  5.419e-04   2.182   0.0322 *  
m_whorliness -7.906e-02  5.455e-02  -1.449   0.1514    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.1395 on 76 degrees of freedom
Multiple R-squared:  0.274, Adjusted R-squared:  0.2167 
F-statistic: 4.781 on 6 and 76 DF,  p-value: 0.0003479

Call:
lm(formula = y ~ density + sweep.prod + m_waist, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-3.3170 -1.4776 -0.2643  1.0128 10.4716 

Coefficients:
             Estimate Std. Error t value Pr(>|t|)    
(Intercept) 11.653904   2.953953   3.945 0.000144 ***
density     -0.007949   0.003093  -2.570 0.011562 *  
sweep.prod   2.111823   0.877651   2.406 0.017849 *  
m_waist     -1.155524   0.645883  -1.789 0.076461 .  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 2.198 on 106 degrees of freedom
Multiple R-squared:  0.1473,    Adjusted R-squared:  0.1232 
F-statistic: 6.105 on 3 and 106 DF,  p-value: 0.0007164

Call:
lm(formula = y ~ SWV + density + sweep.prod, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-3.3097 -1.1490 -0.2803  0.9707  7.0408 

Coefficients:
             Estimate Std. Error t value Pr(>|t|)    
(Intercept) 19.824808   4.273469   4.639 1.12e-05 ***
SWV         -0.001852   0.000787  -2.353 0.020675 *  
density     -0.010220   0.002713  -3.767 0.000287 ***
sweep.prod   1.342889   0.775881   1.731 0.086735 .  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.769 on 95 degrees of freedom
Multiple R-squared:  0.2106,    Adjusted R-squared:  0.1857 
F-statistic: 8.448 on 3 and 95 DF,  p-value: 4.94e-05

Call:
lm(formula = y ~ density + m_sed + m_waist, data = LL)

Residuals:
   Min     1Q Median     3Q    Max 
-6.288 -2.223 -0.860  1.490 13.596 

Coefficients:
             Estimate Std. Error t value Pr(>|t|)   
(Intercept) 14.008413   4.365237   3.209  0.00176 **
density     -0.013907   0.004708  -2.954  0.00386 **
m_sed        0.015127   0.005089   2.973  0.00366 **
m_waist     -2.070118   1.013245  -2.043  0.04353 * 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 3.328 on 106 degrees of freedom
Multiple R-squared:  0.1365,    Adjusted R-squared:  0.112 
F-statistic: 5.585 on 3 and 106 DF,  p-value: 0.001352

Call:
lm(formula = y ~ SWV + density + m_volume + m_waist, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-5.4912 -2.1006 -0.5942  1.6468  9.6802 

Coefficients:
             Estimate Std. Error t value Pr(>|t|)    
(Intercept) 23.964349   6.626695   3.616 0.000483 ***
SWV         -0.002201   0.001284  -1.714 0.089836 .  
density     -0.014478   0.004331  -3.343 0.001192 ** 
m_volume     5.420538   1.842224   2.942 0.004102 ** 
m_waist     -1.361540   0.911003  -1.495 0.138381    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 2.885 on 94 degrees of freedom
Multiple R-squared:  0.1912,    Adjusted R-squared:  0.1568 
F-statistic: 5.556 on 4 and 94 DF,  p-value: 0.0004653

Call:
lm(formula = y ~ SWV + m_waist + m_a2, data = LL)

Residuals:
   Min     1Q Median     3Q    Max 
-4.452 -1.613 -0.563  1.139 10.283 

Coefficients:
              Estimate Std. Error t value Pr(>|t|)   
(Intercept)  12.452262   3.664267   3.398   0.0010 **
SWV          -0.002389   0.001109  -2.154   0.0339 * 
m_waist     -49.942189  32.476941  -1.538   0.1275   
m_a2          0.530931   0.354792   1.496   0.1380   
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 2.536 on 92 degrees of freedom
Multiple R-squared:  0.1016,    Adjusted R-squared:  0.07232 
F-statistic: 3.469 on 3 and 92 DF,  p-value: 0.01934

Call:
lm(formula = y ~ SWV + m_waist + m_a2, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-4.2440 -1.4690 -0.3849  1.1939 10.0172 

Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
(Intercept)  14.129999   3.438042   4.110 9.42e-05 ***
SWV          -0.002976   0.001043  -2.854  0.00548 ** 
m_waist     -53.362893  30.807196  -1.732  0.08705 .  
m_a2          0.570384   0.336274   1.696  0.09369 .  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 2.275 on 81 degrees of freedom
Multiple R-squared:  0.1489,    Adjusted R-squared:  0.1174 
F-statistic: 4.725 on 3 and 81 DF,  p-value: 0.004339

Call:
lm(formula = y ~ SWV + density + m_taper + m_whorliness, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-8.3691 -2.2349 -0.4538  1.6654 16.0980 

Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
(Intercept)  48.501185   7.972952   6.083 1.94e-08 ***
SWV          -0.006148   0.001506  -4.083 8.70e-05 ***
density      -0.014984   0.005031  -2.978   0.0036 ** 
m_taper      -0.222586   0.131070  -1.698   0.0924 .  
m_whorliness -2.041574   1.258311  -1.622   0.1077    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 3.451 on 105 degrees of freedom
Multiple R-squared:  0.189, Adjusted R-squared:  0.1581 
F-statistic: 6.119 on 4 and 105 DF,  p-value: 0.0001824

Call:
lm(formula = y ~ SWV + m_taper + density, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-7.8825 -2.1014 -0.2936  2.0101  8.9927 

Coefficients:
             Estimate Std. Error t value Pr(>|t|)    
(Intercept) 43.332042   7.417488   5.842 7.21e-08 ***
SWV         -0.005835   0.001421  -4.105 8.54e-05 ***
m_taper     -0.350933   0.115328  -3.043  0.00303 ** 
density     -0.011328   0.004671  -2.425  0.01719 *  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 3.144 on 95 degrees of freedom
Multiple R-squared:  0.1957,    Adjusted R-squared:  0.1703 
F-statistic: 7.703 on 3 and 95 DF,  p-value: 0.0001163

Call:
lm(formula = y ~ SWV + m_ovality + density + m_a1, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-8.8071 -3.4889 -0.9923  2.6980 17.9881 

Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
(Intercept)  5.163e+01  1.133e+01   4.559  1.4e-05 ***
SWV         -7.409e-03  2.182e-03  -3.395  0.00097 ***
m_ovality    1.994e+03  7.068e+02   2.821  0.00573 ** 
density     -1.666e-02  7.329e-03  -2.273  0.02507 *  
m_a1        -3.115e-02  1.721e-02  -1.810  0.07311 .  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 5.11 on 105 degrees of freedom
Multiple R-squared:  0.1666,    Adjusted R-squared:  0.1349 
F-statistic: 5.249 on 4 and 105 DF,  p-value: 0.0006807

Call:
lm(formula = y ~ SWV + m_taper + density + m_ovality + m_a2, 
    data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-8.4699 -3.4732 -0.7993  2.6272 17.1912 

Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
(Intercept)  5.435e+01  1.183e+01   4.594 1.36e-05 ***
SWV         -8.285e-03  2.273e-03  -3.645  0.00044 ***
m_taper     -4.257e-01  1.870e-01  -2.276  0.02513 *  
density     -1.343e-02  7.275e-03  -1.846  0.06814 .  
m_ovality    1.196e+03  7.226e+02   1.656  0.10117    
m_a2         2.488e-02  1.685e-02   1.477  0.14314    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 4.876 on 93 degrees of freedom
Multiple R-squared:  0.1574,    Adjusted R-squared:  0.1121 
F-statistic: 3.475 on 5 and 93 DF,  p-value: 0.006346

Call:
lm(formula = y ~ SWV + density + m_taper, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-9.8770 -2.9641 -0.8829  2.2955 29.8845 

Coefficients:
             Estimate Std. Error t value Pr(>|t|)    
(Intercept) 76.793153  14.951333   5.136 1.56e-06 ***
SWV         -0.011094   0.002821  -3.933 0.000163 ***
density     -0.027576   0.009940  -2.774 0.006698 ** 
m_taper     -0.484845   0.215945  -2.245 0.027149 *  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 6.003 on 92 degrees of freedom
Multiple R-squared:  0.1883,    Adjusted R-squared:  0.1618 
F-statistic: 7.112 on 3 and 92 DF,  p-value: 0.000238

Call:
lm(formula = y ~ SWV + density + m_taper, data = LL)

Residuals:
   Min     1Q Median     3Q    Max 
-9.688 -3.494 -1.154  2.504 30.197 

Coefficients:
             Estimate Std. Error t value Pr(>|t|)    
(Intercept) 73.851653  16.191384   4.561 1.79e-05 ***
SWV         -0.010823   0.003025  -3.578 0.000589 ***
density     -0.025032   0.010657  -2.349 0.021272 *  
m_taper     -0.526517   0.231231  -2.277 0.025423 *  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 6.156 on 81 degrees of freedom
Multiple R-squared:  0.1778,    Adjusted R-squared:  0.1474 
F-statistic:  5.84 on 3 and 81 DF,  p-value: 0.001157

Call:
lm(formula = y ~ SWV + m_led + density, data = LL)

Residuals:
   Min     1Q Median     3Q    Max 
-3.248 -1.267  0.010  1.006  4.360 

Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
(Intercept) 13.7109424  3.6064887   3.802  0.00024 ***
SWV         -0.0038241  0.0006847  -5.585 1.82e-07 ***
m_led       -0.0139476  0.0022681  -6.150 1.40e-08 ***
density      0.0073719  0.0023770   3.101  0.00247 ** 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.64 on 106 degrees of freedom
Multiple R-squared:  0.3886,    Adjusted R-squared:  0.3713 
F-statistic: 22.46 on 3 and 106 DF,  p-value: 2.469e-11

Call:
lm(formula = y ~ SWV + m_led + density + m_sed, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-3.4235 -1.3939  0.0823  1.0316  4.1310 

Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
(Intercept) 14.4494854  3.8816697   3.722 0.000336 ***
SWV         -0.0038770  0.0007339  -5.282 8.21e-07 ***
m_led       -0.0300531  0.0105285  -2.854 0.005304 ** 
density      0.0072377  0.0024971   2.898 0.004666 ** 
m_sed        0.0172826  0.0113627   1.521 0.131617    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.666 on 94 degrees of freedom
Multiple R-squared:  0.4124,    Adjusted R-squared:  0.3874 
F-statistic: 16.49 on 4 and 94 DF,  p-value: 2.865e-10

Call:
lm(formula = y ~ SWV + m_led + density + m_sed + m_sweep1, data = LL)

Residuals:
   Min     1Q Median     3Q    Max 
-4.582 -1.796 -0.130  1.532  5.547 

Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
(Intercept) 12.7874359  5.2124739   2.453 0.015820 *  
SWV         -0.0039318  0.0009836  -3.997 0.000120 ***
m_led       -0.0519144  0.0141102  -3.679 0.000373 ***
density      0.0138862  0.0033889   4.098 8.29e-05 ***
m_sed        0.0363740  0.0152884   2.379 0.019175 *  
m_sweep1    -0.5420807  0.3583244  -1.513 0.133358    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 2.327 on 104 degrees of freedom
Multiple R-squared:  0.393, Adjusted R-squared:  0.3638 
F-statistic: 13.47 on 5 and 104 DF,  p-value: 3.999e-10

Call:
lm(formula = y ~ SWV + m_led + density + m_sed, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-4.4742 -2.0759 -0.1849  1.6187  5.1347 

Coefficients:
             Estimate Std. Error t value Pr(>|t|)    
(Intercept)  9.602588   5.419818   1.772 0.079676 .  
SWV         -0.003382   0.001025  -3.300 0.001365 ** 
m_led       -0.057651   0.014701  -3.922 0.000167 ***
density      0.015139   0.003487   4.342 3.56e-05 ***
m_sed        0.041572   0.015865   2.620 0.010243 *  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 2.327 on 94 degrees of freedom
Multiple R-squared:  0.4061,    Adjusted R-squared:  0.3809 
F-statistic: 16.07 on 4 and 94 DF,  p-value: 4.636e-10

2.4.2 JH ‘well-represented’ logs

  1. chosen by vfrac rec
rec = L$nboards.complete/L$volume
for (lmeas in log.quality.measures) {
  models <- cf.full(lmeas, idx.sub=rec>quantile(rec, 0.8))
}

Call:
lm(formula = y ~ SWV + density + m_a2 + hw.vfrac + m_led + m_whorliness, 
    data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-3.6602 -0.4242  0.0010  0.4909  1.6757 

Coefficients:
               Estimate Std. Error t value Pr(>|t|)    
(Intercept)  -1.284e+01  2.340e+00  -5.486 2.96e-07 ***
SWV           4.923e-03  3.376e-04  14.583  < 2e-16 ***
density       6.447e-03  1.890e-03   3.412 0.000924 ***
m_a2          6.458e-03  2.759e-03   2.340 0.021205 *  
hw.vfrac     -3.054e+00  1.275e+00  -2.394 0.018475 *  
m_led         2.272e-03  1.172e-03   1.937 0.055445 .  
m_whorliness -5.163e-01  2.709e-01  -1.906 0.059419 .  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.7673 on 103 degrees of freedom
Multiple R-squared:  0.7478,    Adjusted R-squared:  0.7331 
F-statistic: 50.91 on 6 and 103 DF,  p-value: < 2.2e-16

Call:
lm(formula = y ~ SWV + density + m_led + m_a1 + m_whorliness, 
    data = LL)

Residuals:
     Min       1Q   Median       3Q      Max 
-0.88746 -0.25900 -0.03626  0.24653  0.69369 

Coefficients:
               Estimate Std. Error t value Pr(>|t|)    
(Intercept)  -2.267e+01  2.648e+00  -8.564 9.16e-08 ***
SWV           7.154e-03  5.012e-04  14.274 2.95e-11 ***
density       6.552e-03  1.828e-03   3.584  0.00212 ** 
m_led         7.109e-03  1.827e-03   3.891  0.00107 ** 
m_a1         -1.291e-02  4.241e-03  -3.045  0.00697 ** 
m_whorliness  6.390e-01  4.722e-01   1.353  0.19279    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.4357 on 18 degrees of freedom
Multiple R-squared:  0.9421,    Adjusted R-squared:  0.926 
F-statistic: 58.52 on 5 and 18 DF,  p-value: 1.678e-10

Call:
lm(formula = y ~ SWV + density + m_a2 + hw.vfrac + m_led + m_whorliness, 
    data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-3.6602 -0.4242  0.0010  0.4909  1.6757 

Coefficients:
               Estimate Std. Error t value Pr(>|t|)    
(Intercept)  -1.284e+01  2.340e+00  -5.486 2.96e-07 ***
SWV           4.923e-03  3.376e-04  14.583  < 2e-16 ***
density       6.447e-03  1.890e-03   3.412 0.000924 ***
m_a2          6.458e-03  2.759e-03   2.340 0.021205 *  
hw.vfrac     -3.054e+00  1.275e+00  -2.394 0.018475 *  
m_led         2.272e-03  1.172e-03   1.937 0.055445 .  
m_whorliness -5.163e-01  2.709e-01  -1.906 0.059419 .  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.7673 on 103 degrees of freedom
Multiple R-squared:  0.7478,    Adjusted R-squared:  0.7331 
F-statistic: 50.91 on 6 and 103 DF,  p-value: < 2.2e-16

Call:
lm(formula = y ~ SWV + density + m_led + m_a1 + m_whorliness, 
    data = LL)

Residuals:
     Min       1Q   Median       3Q      Max 
-0.88746 -0.25900 -0.03626  0.24653  0.69369 

Coefficients:
               Estimate Std. Error t value Pr(>|t|)    
(Intercept)  -2.267e+01  2.648e+00  -8.564 9.16e-08 ***
SWV           7.154e-03  5.012e-04  14.274 2.95e-11 ***
density       6.552e-03  1.828e-03   3.584  0.00212 ** 
m_led         7.109e-03  1.827e-03   3.891  0.00107 ** 
m_a1         -1.291e-02  4.241e-03  -3.045  0.00697 ** 
m_whorliness  6.390e-01  4.722e-01   1.353  0.19279    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.4357 on 18 degrees of freedom
Multiple R-squared:  0.9421,    Adjusted R-squared:  0.926 
F-statistic: 58.52 on 5 and 18 DF,  p-value: 1.678e-10

Call:
lm(formula = y ~ SWV + density + m_a0 + m_whorliness, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-3.0939 -0.5006 -0.1318  0.6620  3.3537 

Coefficients:
               Estimate Std. Error t value Pr(>|t|)    
(Intercept)  -1.054e+01  2.430e+00  -4.337 3.33e-05 ***
SWV           3.440e-03  4.456e-04   7.720 7.14e-12 ***
density       1.073e-02  1.558e-03   6.883 4.40e-10 ***
m_a0         -5.882e-03  1.595e-03  -3.687 0.000361 ***
m_whorliness -1.020e+00  3.621e-01  -2.816 0.005802 ** 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.063 on 105 degrees of freedom
Multiple R-squared:  0.5553,    Adjusted R-squared:  0.5383 
F-statistic: 32.77 on 4 and 105 DF,  p-value: < 2.2e-16

Call:
lm(formula = y ~ SWV + hw.vfrac + m_a0 + m_sweep2 + m_sed + m_whorliness, 
    data = LL)

Residuals:
     Min       1Q   Median       3Q      Max 
-0.94428 -0.33315  0.00002  0.27278  1.08558 

Coefficients:
               Estimate Std. Error t value Pr(>|t|)    
(Intercept)   6.159e-01  3.183e+00   0.193   0.8489    
SWV           3.683e-03  6.905e-04   5.333 5.49e-05 ***
hw.vfrac     -1.029e+01  1.922e+00  -5.352 5.28e-05 ***
m_a0         -6.450e-02  2.630e-02  -2.452   0.0253 *  
m_sweep2     -3.495e+00  1.383e+00  -2.527   0.0217 *  
m_sed         5.825e-02  2.621e-02   2.223   0.0401 *  
m_whorliness  1.127e+00  6.996e-01   1.610   0.1257    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.5922 on 17 degrees of freedom
Multiple R-squared:  0.8664,    Adjusted R-squared:  0.8193 
F-statistic: 18.38 on 6 and 17 DF,  p-value: 1.431e-06

Call:
lm(formula = y ~ SWV + density + m_a1 + m_sweep1 + m_ovality + 
    hw.vfrac, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-5.4250 -0.5269 -0.1105  0.5919  3.6464 

Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
(Intercept) -1.370e+01  4.111e+00  -3.333  0.00126 ** 
SWV          6.240e-03  5.916e-04  10.547  < 2e-16 ***
density      5.777e-03  3.388e-03   1.705  0.09174 .  
m_a1        -1.448e-02  4.471e-03  -3.238  0.00171 ** 
m_sweep1    -4.274e-01  2.128e-01  -2.009  0.04768 *  
m_ovality    3.299e+02  1.791e+02   1.842  0.06886 .  
hw.vfrac    -3.839e+00  2.220e+00  -1.729  0.08728 .  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.248 on 87 degrees of freedom
Multiple R-squared:  0.656, Adjusted R-squared:  0.6322 
F-statistic: 27.65 on 6 and 87 DF,  p-value: < 2.2e-16

Call:
lm(formula = y ~ SWV + m_a2 + m_a0 + density + weight, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-1.3501 -0.4890 -0.1390  0.4781  1.7667 

Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
(Intercept) -37.430072   5.529941  -6.769 3.28e-06 ***
SWV           0.009902   0.000872  11.356 2.33e-09 ***
m_a2          0.024085   0.009928   2.426   0.0267 *  
m_a0          0.034455   0.018278   1.885   0.0766 .  
density       0.008899   0.003405   2.614   0.0181 *  
weight       -0.008844   0.006440  -1.373   0.1875    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.7873 on 17 degrees of freedom
Multiple R-squared:  0.9122,    Adjusted R-squared:  0.8863 
F-statistic: 35.31 on 5 and 17 DF,  p-value: 2.123e-08

Call:
lm(formula = y ~ SWV + m_a0 + m_sweep1 + m_ovality + m_a1 + m_whorliness + 
    m_waist, data = LL)

Residuals:
     Min       1Q   Median       3Q      Max 
-0.25566 -0.09036 -0.00736  0.06609  0.39768 

Coefficients:
               Estimate Std. Error t value Pr(>|t|)    
(Intercept)   1.308e+00  2.633e-01   4.966 3.43e-06 ***
SWV          -1.163e-04  6.520e-05  -1.784  0.07796 .  
m_a0         -6.415e-04  2.398e-04  -2.675  0.00895 ** 
m_sweep1      5.468e-02  2.293e-02   2.385  0.01929 *  
m_ovality    -4.362e+01  1.936e+01  -2.253  0.02678 *  
m_a1          2.888e-03  1.188e-03   2.431  0.01715 *  
m_whorliness -1.182e-01  5.225e-02  -2.263  0.02617 *  
m_waist       1.531e-01  1.053e-01   1.454  0.14958    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.1338 on 86 degrees of freedom
Multiple R-squared:  0.2895,    Adjusted R-squared:  0.2317 
F-statistic: 5.007 on 7 and 86 DF,  p-value: 8.649e-05

Call:
lm(formula = y ~ SWV + m_a0 + m_volume + m_led + hw.vfrac + m_sed, 
    data = LL)

Residuals:
     Min       1Q   Median       3Q      Max 
-0.11060 -0.04572 -0.00163  0.02654  0.12192 

Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
(Intercept)  4.142e+00  4.717e-01   8.780 1.63e-07 ***
SWV         -3.785e-04  8.198e-05  -4.617 0.000285 ***
m_a0        -1.153e-02  3.594e-03  -3.208 0.005484 ** 
m_volume     3.470e+00  7.989e-01   4.344 0.000502 ***
m_led       -3.511e-03  1.857e-03  -1.891 0.076924 .  
hw.vfrac    -6.370e-01  2.355e-01  -2.705 0.015616 *  
m_sed        4.684e-03  3.494e-03   1.340 0.198842    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.07049 on 16 degrees of freedom
Multiple R-squared:  0.7997,    Adjusted R-squared:  0.7246 
F-statistic: 10.65 on 6 and 16 DF,  p-value: 7.877e-05

Call:
lm(formula = y ~ density + sweep.prod + m_waist, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-3.3170 -1.4776 -0.2643  1.0128 10.4716 

Coefficients:
             Estimate Std. Error t value Pr(>|t|)    
(Intercept) 11.653904   2.953953   3.945 0.000144 ***
density     -0.007949   0.003093  -2.570 0.011562 *  
sweep.prod   2.111823   0.877651   2.406 0.017849 *  
m_waist     -1.155524   0.645883  -1.789 0.076461 .  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 2.198 on 106 degrees of freedom
Multiple R-squared:  0.1473,    Adjusted R-squared:  0.1232 
F-statistic: 6.105 on 3 and 106 DF,  p-value: 0.0007164

Call:
lm(formula = y ~ 1, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-2.7775 -1.8803 -0.3013  0.7761 11.8475 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept)   4.7775     0.6014   7.944 4.84e-08 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 2.946 on 23 degrees of freedom

Call:
lm(formula = y ~ density + m_sed + m_waist, data = LL)

Residuals:
   Min     1Q Median     3Q    Max 
-6.288 -2.223 -0.860  1.490 13.596 

Coefficients:
             Estimate Std. Error t value Pr(>|t|)   
(Intercept) 14.008413   4.365237   3.209  0.00176 **
density     -0.013907   0.004708  -2.954  0.00386 **
m_sed        0.015127   0.005089   2.973  0.00366 **
m_waist     -2.070118   1.013245  -2.043  0.04353 * 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 3.328 on 106 degrees of freedom
Multiple R-squared:  0.1365,    Adjusted R-squared:  0.112 
F-statistic: 5.585 on 3 and 106 DF,  p-value: 0.001352

Call:
lm(formula = y ~ m_sed + weight, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-7.4673 -1.9309 -0.2402  1.5298 11.1283 

Coefficients:
             Estimate Std. Error t value Pr(>|t|)   
(Intercept) -35.35222   11.92359  -2.965  0.00739 **
m_sed         0.22457    0.07009   3.204  0.00426 **
weight       -0.06864    0.02390  -2.872  0.00912 **
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 3.545 on 21 degrees of freedom
Multiple R-squared:  0.4005,    Adjusted R-squared:  0.3434 
F-statistic: 7.014 on 2 and 21 DF,  p-value: 0.004644

Call:
lm(formula = y ~ SWV + m_waist + m_a2, data = LL)

Residuals:
   Min     1Q Median     3Q    Max 
-4.452 -1.613 -0.563  1.139 10.283 

Coefficients:
              Estimate Std. Error t value Pr(>|t|)   
(Intercept)  12.452262   3.664267   3.398   0.0010 **
SWV          -0.002389   0.001109  -2.154   0.0339 * 
m_waist     -49.942189  32.476941  -1.538   0.1275   
m_a2          0.530931   0.354792   1.496   0.1380   
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 2.536 on 92 degrees of freedom
Multiple R-squared:  0.1016,    Adjusted R-squared:  0.07232 
F-statistic: 3.469 on 3 and 92 DF,  p-value: 0.01934

Call:
lm(formula = y ~ 1, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-2.4812 -1.4812 -0.6812  1.0605  5.5188 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept)   4.4812     0.4425   10.13 9.59e-10 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 2.122 on 22 degrees of freedom

Call:
lm(formula = y ~ SWV + density + m_taper + m_whorliness, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-8.3691 -2.2349 -0.4538  1.6654 16.0980 

Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
(Intercept)  48.501185   7.972952   6.083 1.94e-08 ***
SWV          -0.006148   0.001506  -4.083 8.70e-05 ***
density      -0.014984   0.005031  -2.978   0.0036 ** 
m_taper      -0.222586   0.131070  -1.698   0.0924 .  
m_whorliness -2.041574   1.258311  -1.622   0.1077    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 3.451 on 105 degrees of freedom
Multiple R-squared:  0.189, Adjusted R-squared:  0.1581 
F-statistic: 6.119 on 4 and 105 DF,  p-value: 0.0001824

Call:
lm(formula = y ~ SWV + weight, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-5.9310 -1.3120 -0.0798  1.3159  6.4601 

Coefficients:
             Estimate Std. Error t value Pr(>|t|)    
(Intercept) 49.719501  11.049087   4.500 0.000197 ***
SWV         -0.010910   0.003041  -3.588 0.001734 ** 
weight      -0.007597   0.003765  -2.018 0.056573 .  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 2.837 on 21 degrees of freedom
Multiple R-squared:  0.3822,    Adjusted R-squared:  0.3233 
F-statistic: 6.495 on 2 and 21 DF,  p-value: 0.006368

Call:
lm(formula = y ~ SWV + m_ovality + density + m_a1, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-8.8071 -3.4889 -0.9923  2.6980 17.9881 

Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
(Intercept)  5.163e+01  1.133e+01   4.559  1.4e-05 ***
SWV         -7.409e-03  2.182e-03  -3.395  0.00097 ***
m_ovality    1.994e+03  7.068e+02   2.821  0.00573 ** 
density     -1.666e-02  7.329e-03  -2.273  0.02507 *  
m_a1        -3.115e-02  1.721e-02  -1.810  0.07311 .  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 5.11 on 105 degrees of freedom
Multiple R-squared:  0.1666,    Adjusted R-squared:  0.1349 
F-statistic: 5.249 on 4 and 105 DF,  p-value: 0.0006807

Call:
lm(formula = y ~ SWV + weight + m_a0, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-8.1079 -3.0579 -0.0426  2.2918  9.2032 

Coefficients:
             Estimate Std. Error t value Pr(>|t|)  
(Intercept) 38.562970  22.999889   1.677   0.1092  
SWV         -0.013006   0.004798  -2.711   0.0135 *
weight      -0.051554   0.030385  -1.697   0.1053  
m_a0         0.120156   0.087093   1.380   0.1829  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 4.473 on 20 degrees of freedom
Multiple R-squared:  0.3226,    Adjusted R-squared:  0.221 
F-statistic: 3.175 on 3 and 20 DF,  p-value: 0.04655

Call:
lm(formula = y ~ SWV + density + m_taper, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-9.8770 -2.9641 -0.8829  2.2955 29.8845 

Coefficients:
             Estimate Std. Error t value Pr(>|t|)    
(Intercept) 76.793153  14.951333   5.136 1.56e-06 ***
SWV         -0.011094   0.002821  -3.933 0.000163 ***
density     -0.027576   0.009940  -2.774 0.006698 ** 
m_taper     -0.484845   0.215945  -2.245 0.027149 *  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 6.003 on 92 degrees of freedom
Multiple R-squared:  0.1883,    Adjusted R-squared:  0.1618 
F-statistic: 7.112 on 3 and 92 DF,  p-value: 0.000238

Call:
lm(formula = y ~ SWV + sweep.prod + m_whorliness + m_taper, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-6.3792 -1.5763 -0.4494  2.0104  6.1725 

Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
(Intercept)  49.759344  10.467009   4.754 0.000159 ***
SWV          -0.010177   0.002805  -3.627 0.001926 ** 
sweep.prod    6.748296   2.356017   2.864 0.010310 *  
m_whorliness -6.854258   3.278325  -2.091 0.051003 .  
m_taper      -0.558161   0.272914  -2.045 0.055738 .  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 3.038 on 18 degrees of freedom
Multiple R-squared:  0.5618,    Adjusted R-squared:  0.4644 
F-statistic:  5.77 on 4 and 18 DF,  p-value: 0.003607

Call:
lm(formula = y ~ SWV + m_led + density, data = LL)

Residuals:
   Min     1Q Median     3Q    Max 
-3.248 -1.267  0.010  1.006  4.360 

Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
(Intercept) 13.7109424  3.6064887   3.802  0.00024 ***
SWV         -0.0038241  0.0006847  -5.585 1.82e-07 ***
m_led       -0.0139476  0.0022681  -6.150 1.40e-08 ***
density      0.0073719  0.0023770   3.101  0.00247 ** 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.64 on 106 degrees of freedom
Multiple R-squared:  0.3886,    Adjusted R-squared:  0.3713 
F-statistic: 22.46 on 3 and 106 DF,  p-value: 2.469e-11

Call:
lm(formula = y ~ SWV + m_volume + weight, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-3.2224 -0.7616  0.2203  1.0104  2.4579 

Coefficients:
              Estimate Std. Error t value Pr(>|t|)   
(Intercept)  19.471236   5.865099   3.320  0.00342 **
SWV          -0.004294   0.001600  -2.684  0.01427 * 
m_volume    -27.130566  14.671475  -1.849  0.07926 . 
weight        0.021518   0.013379   1.608  0.12344   
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.487 on 20 degrees of freedom
Multiple R-squared:  0.3305,    Adjusted R-squared:  0.2301 
F-statistic: 3.291 on 3 and 20 DF,  p-value: 0.04178

Call:
lm(formula = y ~ SWV + m_led + density + m_sed + m_sweep1, data = LL)

Residuals:
   Min     1Q Median     3Q    Max 
-4.582 -1.796 -0.130  1.532  5.547 

Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
(Intercept) 12.7874359  5.2124739   2.453 0.015820 *  
SWV         -0.0039318  0.0009836  -3.997 0.000120 ***
m_led       -0.0519144  0.0141102  -3.679 0.000373 ***
density      0.0138862  0.0033889   4.098 8.29e-05 ***
m_sed        0.0363740  0.0152884   2.379 0.019175 *  
m_sweep1    -0.5420807  0.3583244  -1.513 0.133358    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 2.327 on 104 degrees of freedom
Multiple R-squared:  0.393, Adjusted R-squared:  0.3638 
F-statistic: 13.47 on 5 and 104 DF,  p-value: 3.999e-10

Call:
lm(formula = y ~ SWV + m_volume + weight + m_whorliness, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-4.8823 -1.1936 -0.3458  1.1601  5.8986 

Coefficients:
               Estimate Std. Error t value Pr(>|t|)   
(Intercept)   37.963402  11.357559   3.343  0.00342 **
SWV           -0.007732   0.002845  -2.718  0.01366 * 
m_volume     -54.638209  24.759262  -2.207  0.03983 * 
weight         0.042520   0.022535   1.887  0.07456 . 
m_whorliness  -3.987669   2.712342  -1.470  0.15788   
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 2.504 on 19 degrees of freedom
Multiple R-squared:  0.3768,    Adjusted R-squared:  0.2456 
F-statistic: 2.872 on 4 and 19 DF,  p-value: 0.05124
  1. Chosen by visual inspection of saw patterns
xyplot(rec ~ volume, L, group=SWILogNumber%in%near.complete.sawpatterns)
for (lmeas in log.quality.measures) {
  models <- cf.full(lmeas, idx.sub=L$SWILogNumber%in%near.complete.sawpatterns)
}

Call:
lm(formula = y ~ SWV + density + m_a2 + hw.vfrac + m_led + m_whorliness, 
    data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-3.6602 -0.4242  0.0010  0.4909  1.6757 

Coefficients:
               Estimate Std. Error t value Pr(>|t|)    
(Intercept)  -1.284e+01  2.340e+00  -5.486 2.96e-07 ***
SWV           4.923e-03  3.376e-04  14.583  < 2e-16 ***
density       6.447e-03  1.890e-03   3.412 0.000924 ***
m_a2          6.458e-03  2.759e-03   2.340 0.021205 *  
hw.vfrac     -3.054e+00  1.275e+00  -2.394 0.018475 *  
m_led         2.272e-03  1.172e-03   1.937 0.055445 .  
m_whorliness -5.163e-01  2.709e-01  -1.906 0.059419 .  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.7673 on 103 degrees of freedom
Multiple R-squared:  0.7478,    Adjusted R-squared:  0.7331 
F-statistic: 50.91 on 6 and 103 DF,  p-value: < 2.2e-16

Call:
lm(formula = y ~ SWV + density + weight + m_a0, data = LL)

Residuals:
     Min       1Q   Median       3Q      Max 
-0.70670 -0.18717  0.09253  0.29746  0.49427 

Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
(Intercept) -2.005e+01  3.183e+00  -6.299 1.06e-05 ***
SWV          6.661e-03  4.793e-04  13.900 2.38e-10 ***
density      9.728e-03  2.164e-03   4.495 0.000367 ***
weight       6.061e-03  2.762e-03   2.195 0.043275 *  
m_a0        -1.323e-02  7.705e-03  -1.717 0.105287    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.3604 on 16 degrees of freedom
Multiple R-squared:  0.9514,    Adjusted R-squared:  0.9393 
F-statistic: 78.34 on 4 and 16 DF,  p-value: 2.67e-10

Call:
lm(formula = y ~ SWV + density + m_a2 + hw.vfrac + m_led + m_whorliness, 
    data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-3.6602 -0.4242  0.0010  0.4909  1.6757 

Coefficients:
               Estimate Std. Error t value Pr(>|t|)    
(Intercept)  -1.284e+01  2.340e+00  -5.486 2.96e-07 ***
SWV           4.923e-03  3.376e-04  14.583  < 2e-16 ***
density       6.447e-03  1.890e-03   3.412 0.000924 ***
m_a2          6.458e-03  2.759e-03   2.340 0.021205 *  
hw.vfrac     -3.054e+00  1.275e+00  -2.394 0.018475 *  
m_led         2.272e-03  1.172e-03   1.937 0.055445 .  
m_whorliness -5.163e-01  2.709e-01  -1.906 0.059419 .  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.7673 on 103 degrees of freedom
Multiple R-squared:  0.7478,    Adjusted R-squared:  0.7331 
F-statistic: 50.91 on 6 and 103 DF,  p-value: < 2.2e-16

Call:
lm(formula = y ~ SWV + density + weight + m_a0, data = LL)

Residuals:
     Min       1Q   Median       3Q      Max 
-0.70670 -0.18717  0.09253  0.29746  0.49427 

Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
(Intercept) -2.005e+01  3.183e+00  -6.299 1.06e-05 ***
SWV          6.661e-03  4.793e-04  13.900 2.38e-10 ***
density      9.728e-03  2.164e-03   4.495 0.000367 ***
weight       6.061e-03  2.762e-03   2.195 0.043275 *  
m_a0        -1.323e-02  7.705e-03  -1.717 0.105287    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.3604 on 16 degrees of freedom
Multiple R-squared:  0.9514,    Adjusted R-squared:  0.9393 
F-statistic: 78.34 on 4 and 16 DF,  p-value: 2.67e-10

Call:
lm(formula = y ~ SWV + density + m_a0 + m_whorliness, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-3.0939 -0.5006 -0.1318  0.6620  3.3537 

Coefficients:
               Estimate Std. Error t value Pr(>|t|)    
(Intercept)  -1.054e+01  2.430e+00  -4.337 3.33e-05 ***
SWV           3.440e-03  4.456e-04   7.720 7.14e-12 ***
density       1.073e-02  1.558e-03   6.883 4.40e-10 ***
m_a0         -5.882e-03  1.595e-03  -3.687 0.000361 ***
m_whorliness -1.020e+00  3.621e-01  -2.816 0.005802 ** 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.063 on 105 degrees of freedom
Multiple R-squared:  0.5553,    Adjusted R-squared:  0.5383 
F-statistic: 32.77 on 4 and 105 DF,  p-value: < 2.2e-16

Call:
lm(formula = y ~ SWV + density + m_a0, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-1.1435 -0.5177 -0.2974  0.2317  3.1009 

Coefficients:
              Estimate Std. Error t value Pr(>|t|)   
(Intercept) -13.221614   6.788385  -1.948  0.06816 . 
SWV           0.004603   0.001351   3.407  0.00336 **
density       0.009881   0.005123   1.929  0.07062 . 
m_a0         -0.008189   0.004271  -1.917  0.07214 . 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.024 on 17 degrees of freedom
Multiple R-squared:  0.7286,    Adjusted R-squared:  0.6807 
F-statistic: 15.22 on 3 and 17 DF,  p-value: 4.574e-05

Call:
lm(formula = y ~ SWV + density + m_a1 + m_sweep1 + m_ovality + 
    hw.vfrac, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-5.4250 -0.5269 -0.1105  0.5919  3.6464 

Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
(Intercept) -1.370e+01  4.111e+00  -3.333  0.00126 ** 
SWV          6.240e-03  5.916e-04  10.547  < 2e-16 ***
density      5.777e-03  3.388e-03   1.705  0.09174 .  
m_a1        -1.448e-02  4.471e-03  -3.238  0.00171 ** 
m_sweep1    -4.274e-01  2.128e-01  -2.009  0.04768 *  
m_ovality    3.299e+02  1.791e+02   1.842  0.06886 .  
hw.vfrac    -3.839e+00  2.220e+00  -1.729  0.08728 .  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.248 on 87 degrees of freedom
Multiple R-squared:  0.656, Adjusted R-squared:  0.6322 
F-statistic: 27.65 on 6 and 87 DF,  p-value: < 2.2e-16

Call:
lm(formula = y ~ SWV + density + m_ovality + m_taper + m_volume + 
    m_whorliness + m_sweep1 + hw.vfrac, data = LL)

Residuals:
     Min       1Q   Median       3Q      Max 
-0.29778 -0.18770 -0.08215  0.20673  0.51244 

Coefficients:
               Estimate Std. Error t value Pr(>|t|)    
(Intercept)  -2.689e+01  2.516e+00 -10.688 8.61e-07 ***
SWV           7.296e-03  5.162e-04  14.135 6.18e-08 ***
density       1.370e-02  1.768e-03   7.748 1.56e-05 ***
m_ovality     3.858e+02  8.996e+01   4.289  0.00159 ** 
m_taper      -8.456e-02  2.654e-02  -3.187  0.00971 ** 
m_volume      1.685e+00  6.502e-01   2.592  0.02686 *  
m_whorliness  1.099e+00  3.989e-01   2.756  0.02028 *  
m_sweep1     -2.341e-01  1.422e-01  -1.646  0.13079    
hw.vfrac     -1.814e+00  1.660e+00  -1.092  0.30025    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.3199 on 10 degrees of freedom
Multiple R-squared:  0.9788,    Adjusted R-squared:  0.9619 
F-statistic: 57.78 on 8 and 10 DF,  p-value: 2.26e-07

Call:
lm(formula = y ~ SWV + m_a0 + m_sweep1 + m_ovality + m_a1 + m_whorliness + 
    m_waist, data = LL)

Residuals:
     Min       1Q   Median       3Q      Max 
-0.25566 -0.09036 -0.00736  0.06609  0.39768 

Coefficients:
               Estimate Std. Error t value Pr(>|t|)    
(Intercept)   1.308e+00  2.633e-01   4.966 3.43e-06 ***
SWV          -1.163e-04  6.520e-05  -1.784  0.07796 .  
m_a0         -6.415e-04  2.398e-04  -2.675  0.00895 ** 
m_sweep1      5.468e-02  2.293e-02   2.385  0.01929 *  
m_ovality    -4.362e+01  1.936e+01  -2.253  0.02678 *  
m_a1          2.888e-03  1.188e-03   2.431  0.01715 *  
m_whorliness -1.182e-01  5.225e-02  -2.263  0.02617 *  
m_waist       1.531e-01  1.053e-01   1.454  0.14958    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.1338 on 86 degrees of freedom
Multiple R-squared:  0.2895,    Adjusted R-squared:  0.2317 
F-statistic: 5.007 on 7 and 86 DF,  p-value: 8.649e-05

Call:
lm(formula = y ~ m_sed + m_led + m_ovality + m_whorliness, data = LL)

Residuals:
     Min       1Q   Median       3Q      Max 
-0.14159 -0.06416 -0.02260  0.01966  0.39860 

Coefficients:
               Estimate Std. Error t value Pr(>|t|)    
(Intercept)    1.206767   0.184817   6.530 1.34e-05 ***
m_sed         -0.005454   0.001974  -2.763   0.0153 *  
m_led          0.004393   0.001791   2.453   0.0279 *  
m_ovality    -61.808328  35.285081  -1.752   0.1017    
m_whorliness  -0.235371   0.140462  -1.676   0.1160    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.132 on 14 degrees of freedom
Multiple R-squared:  0.4577,    Adjusted R-squared:  0.3028 
F-statistic: 2.954 on 4 and 14 DF,  p-value: 0.05797

Call:
lm(formula = y ~ density + sweep.prod + m_waist, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-3.3170 -1.4776 -0.2643  1.0128 10.4716 

Coefficients:
             Estimate Std. Error t value Pr(>|t|)    
(Intercept) 11.653904   2.953953   3.945 0.000144 ***
density     -0.007949   0.003093  -2.570 0.011562 *  
sweep.prod   2.111823   0.877651   2.406 0.017849 *  
m_waist     -1.155524   0.645883  -1.789 0.076461 .  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 2.198 on 106 degrees of freedom
Multiple R-squared:  0.1473,    Adjusted R-squared:  0.1232 
F-statistic: 6.105 on 3 and 106 DF,  p-value: 0.0007164

Call:
lm(formula = y ~ 1, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-2.8139 -1.3834 -0.9012  0.4361 11.3666 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept)    5.258      0.649   8.102 9.58e-08 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 2.974 on 20 degrees of freedom

Call:
lm(formula = y ~ density + m_sed + m_waist, data = LL)

Residuals:
   Min     1Q Median     3Q    Max 
-6.288 -2.223 -0.860  1.490 13.596 

Coefficients:
             Estimate Std. Error t value Pr(>|t|)   
(Intercept) 14.008413   4.365237   3.209  0.00176 **
density     -0.013907   0.004708  -2.954  0.00386 **
m_sed        0.015127   0.005089   2.973  0.00366 **
m_waist     -2.070118   1.013245  -2.043  0.04353 * 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 3.328 on 106 degrees of freedom
Multiple R-squared:  0.1365,    Adjusted R-squared:  0.112 
F-statistic: 5.585 on 3 and 106 DF,  p-value: 0.001352

Call:
lm(formula = y ~ 1, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-4.6944 -2.4611 -0.2111  1.0389 13.3056 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept)   6.2944     0.8281   7.601 2.55e-07 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 3.795 on 20 degrees of freedom

Call:
lm(formula = y ~ SWV + m_waist + m_a2, data = LL)

Residuals:
   Min     1Q Median     3Q    Max 
-4.452 -1.613 -0.563  1.139 10.283 

Coefficients:
              Estimate Std. Error t value Pr(>|t|)   
(Intercept)  12.452262   3.664267   3.398   0.0010 **
SWV          -0.002389   0.001109  -2.154   0.0339 * 
m_waist     -49.942189  32.476941  -1.538   0.1275   
m_a2          0.530931   0.354792   1.496   0.1380   
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 2.536 on 92 degrees of freedom
Multiple R-squared:  0.1016,    Adjusted R-squared:  0.07232 
F-statistic: 3.469 on 3 and 92 DF,  p-value: 0.01934

Call:
lm(formula = y ~ SWV + m_a0 + m_volume + m_sed + weight + m_a1 + 
    m_led + m_taper + m_waist + m_a2, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-1.7645 -0.5759  0.2205  0.7094  1.3483 

Coefficients:
              Estimate Std. Error t value Pr(>|t|)   
(Intercept)  8.517e+01  1.926e+01   4.423  0.00166 **
SWV         -1.389e-02  3.555e-03  -3.906  0.00359 **
m_a0        -1.530e-01  1.268e-01  -1.207  0.25837   
m_volume     1.219e+02  3.323e+01   3.669  0.00516 **
m_sed        2.630e-01  7.630e-02   3.447  0.00731 **
weight      -7.660e-02  2.161e-02  -3.545  0.00626 **
m_a1        -1.666e+00  7.629e-01  -2.183  0.05688 . 
m_led       -2.719e-01  7.152e-02  -3.802  0.00420 **
m_taper      8.904e+00  3.706e+00   2.403  0.03972 * 
m_waist     -3.233e+02  7.726e+01  -4.185  0.00236 **
m_a2         1.895e+00  8.199e-01   2.312  0.04610 * 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.378 on 9 degrees of freedom
Multiple R-squared:  0.8949,    Adjusted R-squared:  0.7782 
F-statistic: 7.667 on 10 and 9 DF,  p-value: 0.002621

Call:
lm(formula = y ~ SWV + density + m_taper + m_whorliness, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-8.3691 -2.2349 -0.4538  1.6654 16.0980 

Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
(Intercept)  48.501185   7.972952   6.083 1.94e-08 ***
SWV          -0.006148   0.001506  -4.083 8.70e-05 ***
density      -0.014984   0.005031  -2.978   0.0036 ** 
m_taper      -0.222586   0.131070  -1.698   0.0924 .  
m_whorliness -2.041574   1.258311  -1.622   0.1077    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 3.451 on 105 degrees of freedom
Multiple R-squared:  0.189, Adjusted R-squared:  0.1581 
F-statistic: 6.119 on 4 and 105 DF,  p-value: 0.0001824

Call:
lm(formula = y ~ SWV + m_led + m_a1, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-5.4833 -1.2486 -0.4416  1.9113  4.4711 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept) 86.50366   19.50337   4.435 0.000363 ***
SWV         -0.01948    0.00460  -4.236 0.000557 ***
m_led       -0.03015    0.01243  -2.426 0.026685 *  
m_a1        -0.04164    0.02580  -1.614 0.125005    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 2.824 on 17 degrees of freedom
Multiple R-squared:  0.5505,    Adjusted R-squared:  0.4711 
F-statistic: 6.939 on 3 and 17 DF,  p-value: 0.002966

Call:
lm(formula = y ~ SWV + m_ovality + density + m_a1, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-8.8071 -3.4889 -0.9923  2.6980 17.9881 

Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
(Intercept)  5.163e+01  1.133e+01   4.559  1.4e-05 ***
SWV         -7.409e-03  2.182e-03  -3.395  0.00097 ***
m_ovality    1.994e+03  7.068e+02   2.821  0.00573 ** 
density     -1.666e-02  7.329e-03  -2.273  0.02507 *  
m_a1        -3.115e-02  1.721e-02  -1.810  0.07311 .  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 5.11 on 105 degrees of freedom
Multiple R-squared:  0.1666,    Adjusted R-squared:  0.1349 
F-statistic: 5.249 on 4 and 105 DF,  p-value: 0.0006807

Call:
lm(formula = y ~ SWV + m_ovality + m_whorliness + m_taper, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-8.5884 -3.6210  0.4863  2.8844  9.1941 

Coefficients:
               Estimate Std. Error t value Pr(>|t|)   
(Intercept)   7.624e+01  2.236e+01   3.410  0.00359 **
SWV          -2.094e-02  5.895e-03  -3.552  0.00265 **
m_ovality     2.646e+03  1.412e+03   1.874  0.07936 . 
m_whorliness  9.132e+00  5.657e+00   1.614  0.12601   
m_taper      -5.635e-01  3.774e-01  -1.493  0.15493   
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 5.448 on 16 degrees of freedom
Multiple R-squared:  0.5543,    Adjusted R-squared:  0.4429 
F-statistic: 4.975 on 4 and 16 DF,  p-value: 0.00846

Call:
lm(formula = y ~ SWV + density + m_taper, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-9.8770 -2.9641 -0.8829  2.2955 29.8845 

Coefficients:
             Estimate Std. Error t value Pr(>|t|)    
(Intercept) 76.793153  14.951333   5.136 1.56e-06 ***
SWV         -0.011094   0.002821  -3.933 0.000163 ***
density     -0.027576   0.009940  -2.774 0.006698 ** 
m_taper     -0.484845   0.215945  -2.245 0.027149 *  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 6.003 on 92 degrees of freedom
Multiple R-squared:  0.1883,    Adjusted R-squared:  0.1618 
F-statistic: 7.112 on 3 and 92 DF,  p-value: 0.000238

Call:
lm(formula = y ~ SWV + m_a0 + hw.vfrac + m_whorliness, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-8.4976 -3.4642  0.1459  3.1434 15.1500 

Coefficients:
               Estimate Std. Error t value Pr(>|t|)   
(Intercept)  135.928624  33.825081   4.019  0.00112 **
SWV           -0.025060   0.008128  -3.083  0.00757 **
m_a0          -0.083429   0.024781  -3.367  0.00424 **
hw.vfrac     -38.914741  22.744306  -1.711  0.10768   
m_whorliness  -9.543790   6.440547  -1.482  0.15909   
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 5.898 on 15 degrees of freedom
Multiple R-squared:  0.5262,    Adjusted R-squared:  0.3998 
F-statistic: 4.164 on 4 and 15 DF,  p-value: 0.01826

Call:
lm(formula = y ~ SWV + m_led + density, data = LL)

Residuals:
   Min     1Q Median     3Q    Max 
-3.248 -1.267  0.010  1.006  4.360 

Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
(Intercept) 13.7109424  3.6064887   3.802  0.00024 ***
SWV         -0.0038241  0.0006847  -5.585 1.82e-07 ***
m_led       -0.0139476  0.0022681  -6.150 1.40e-08 ***
density      0.0073719  0.0023770   3.101  0.00247 ** 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.64 on 106 degrees of freedom
Multiple R-squared:  0.3886,    Adjusted R-squared:  0.3713 
F-statistic: 22.46 on 3 and 106 DF,  p-value: 2.469e-11

Call:
lm(formula = y ~ SWV + m_led + m_whorliness + hw.vfrac, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-1.8945 -0.5266 -0.1464  0.9082  1.8528 

Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
(Intercept)  30.459560   6.808582   4.474 0.000384 ***
SWV          -0.005985   0.001618  -3.698 0.001949 ** 
m_led        -0.014924   0.004404  -3.389 0.003745 ** 
m_whorliness -2.370611   1.210732  -1.958 0.067903 .  
hw.vfrac     -5.814268   4.201633  -1.384 0.185418    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.145 on 16 degrees of freedom
Multiple R-squared:  0.5512,    Adjusted R-squared:  0.439 
F-statistic: 4.913 on 4 and 16 DF,  p-value: 0.008902

Call:
lm(formula = y ~ SWV + m_led + density + m_sed + m_sweep1, data = LL)

Residuals:
   Min     1Q Median     3Q    Max 
-4.582 -1.796 -0.130  1.532  5.547 

Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
(Intercept) 12.7874359  5.2124739   2.453 0.015820 *  
SWV         -0.0039318  0.0009836  -3.997 0.000120 ***
m_led       -0.0519144  0.0141102  -3.679 0.000373 ***
density      0.0138862  0.0033889   4.098 8.29e-05 ***
m_sed        0.0363740  0.0152884   2.379 0.019175 *  
m_sweep1    -0.5420807  0.3583244  -1.513 0.133358    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 2.327 on 104 degrees of freedom
Multiple R-squared:  0.393, Adjusted R-squared:  0.3638 
F-statistic: 13.47 on 5 and 104 DF,  p-value: 3.999e-10

Call:
lm(formula = y ~ SWV + m_led + m_whorliness + m_taper + m_sed + 
    m_a1 + m_a2 + hw.vfrac, data = LL)

Residuals:
    Min      1Q  Median      3Q     Max 
-1.2775 -0.5499 -0.2484  0.8138  1.9334 

Coefficients:
              Estimate Std. Error t value Pr(>|t|)   
(Intercept)  40.475169  11.009177   3.676  0.00317 **
SWV          -0.008303   0.002532  -3.278  0.00660 **
m_led         0.072152   0.043742   1.650  0.12496   
m_whorliness -2.805539   1.246491  -2.251  0.04394 * 
m_taper      -6.822035   2.695447  -2.531  0.02637 * 
m_sed        -0.084517   0.039825  -2.122  0.05532 . 
m_a1          1.325251   0.567780   2.334  0.03779 * 
m_a2          1.302610   0.567042   2.297  0.04040 * 
hw.vfrac     -7.669701   4.630325  -1.656  0.12353   
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.171 on 12 degrees of freedom
Multiple R-squared:  0.8209,    Adjusted R-squared:  0.7015 
F-statistic: 6.876 on 8 and 12 DF,  p-value: 0.001684

3 Conclusions

Best off using a dynamic estimate of board stiffness based on manual hitman velocity and CHH total density, but other measures of board stiffness (including Metriguard CLT) give similar results.

Green log SWV alone very poorly predicts average dry board stiffness.

Distance from pith at LE has limitations as a predictor for average distance from the pith throughout a board.

The saw pattern plots above indicate that there are a lot of boards missing from the dataset. While in routine operation this is ineveitable (and hence an unaviodable if log performance is to be predicted) in a research context this adds extra confusion owing to the boards being missing to different degrees in different logs and the missing boards being clustered (rather than randomly distributed) within individual logs.

4 Todo